From ee95c85ec906505fe5a72c93820239016e6ae759 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 3 Apr 2005 17:38:41 +0000 Subject: [PATCH] Recognize level 0 users in wp_loginout() and wp_register(). http://mosquito.wordpress.org/view.php?id=1202 Props: MC_incubus git-svn-id: http://svn.automattic.com/wordpress/trunk@2513 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-general.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php index 48e457f01..9aa7bb27e 100644 --- a/wp-includes/template-functions-general.php +++ b/wp-includes/template-functions-general.php @@ -25,10 +25,10 @@ function get_sidebar() { function wp_loginout() { - global $user_level; + global $user_ID; get_currentuserinfo(); - if (0 == $user_level) : + if ('' == $user_ID) : $link = '' . __('Login') . ''; else : $link = '' . __('Logout') . ''; @@ -38,13 +38,13 @@ function wp_loginout() { } function wp_register( $before = '
  • ', $after = '
  • ' ) { - global $user_level; + global $user_ID; get_currentuserinfo(); - if (0 == $user_level && get_settings('users_can_register') ) : + if ('' == $user_ID && get_settings('users_can_register') ) : $link = $before . '' . __('Register') . '' . $after; - elseif (0 == $user_level && !get_settings('users_can_register') ) : + elseif ('' == $user_ID && !get_settings('users_can_register') ) : $link = ''; else : $link = $before . '' . __('Site Admin') . '' . $after;