The MU forums have moved to WordPress.org

User menu (2 posts)

  1. zimen
    Member
    Posted 17 years ago #

    I spent some hours to make this and maybe someone of you will find it useful.

    it's a simple menu that changes links depending on who you are.

    If you are an admin, a registered user or unregistered. I made this because i noticed that wpmu does not assign userlevels to normalo registered users. So to make this menu I did the following:

    <?php global $userdata;
    if (function_exists('get_currentuserinfo')) { get_currentuserinfo();
    echo '<font style="text-transform:capitalize;">Hello ' . $userdata->user_login .'!</font>';
    if ($userdata->user_level > 9) {
    wp_register(' | ', ' | ');
    wp_loginout();
    }
    elseif ( isset($userdata->user_login) ) {
    echo ' | '; wp_loginout();
    }
    elseif ( empty($userdata->user_login) ) {
    echo '<a href="http://yoursite.com/wp-signup.php" title="Register">Register</a> | '; wp_loginout();
    }
    }
    ?>

  2. andrea_r
    Moderator
    Posted 17 years ago #

    You should submit this as a patch to trac:
    http://trac.mu.wordpress.org/

    Did anyone submit the original bug?

About this Topic