function theme_userloginbar in UserLoginBar 5
Same name and namespace in other branches
- 8 userloginbar.module \theme_userloginbar()
- 7 userloginbar.module \theme_userloginbar()
Theming function for messages.
1 theme call to theme_userloginbar()
- userloginbar_block in ./
userloginbar.module - implementing the new user login block
File
- ./
userloginbar.module, line 50
Code
function theme_userloginbar() {
drupal_add_css(drupal_get_path('module', 'userloginbar') . '/userloginbar.css');
global $user;
$output = '';
if (arg(0) == "user" && !is_numeric(arg(1))) {
return;
}
if (!$user->uid) {
$output .= drupal_get_form('user_login_block');
}
else {
if (!variable_get('disable_welcome_box', FALSE)) {
$output .= t('<p class="user-info">Hi !user, welcome back.</p>', array(
'!user' => theme('username', $user),
));
$output .= theme('item_list', array(
l(t('Your account'), 'user/' . $user->uid, array(
'title' => t('Edit your account'),
)),
l(t('Sign out'), 'logout'),
));
}
}
$output = '<div id="user-login-form">' . $output . '</div>';
return $output;
}