I am using 4.7rc3. I have added "Login" (user/login) and "Register" (user/register) to my primary links. After logging in, the "Register" link disappears by default. I was wondering if there is a way to make the "Login" link do the same thing.
I looked through user.module and found this:
// Registration and login pages.
$items[] = array('path' => 'user/login', 'title' => t('log in'),
'callback' => 'user_login', 'type' => MENU_DEFAULT_LOCAL_TASK);
$items[] = array('path' => 'user/register', 'title' => t('register'),
'callback' => 'user_register', 'access' => $user->uid == 0 && variable_get('user_register', 1), 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'user/password', 'title' => t('request new password'),
'callback' => 'user_pass', 'access' => $user->uid == 0, 'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'user/reset', 'title' => t('reset password'),
'callback' => 'user_pass_reset', 'access' => TRUE, 'type' => MENU_CALLBACK);
$items[] = array('path' => 'user/help', 'title' => t('help'),
'callback' => 'user_help_page', 'type' => MENU_CALLBACK);
I tried adding: 'access' => $user-uid == 0,
as well as a few other variations to the 'user_login' line. I was able to get the "Login" link to disappear, but it always messed up the login process by directing to a "you do not h