diff options
author | David Rothstein <drothstein@gmail.com> | 2012-12-27 12:34:25 -0500 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2012-12-27 12:34:25 -0500 |
commit | 77c08ef4cb01420e98dc759ada692a08acfbadb3 (patch) | |
tree | ac4378f94bf224813eceeed57bf1a9b6182f0b65 /modules/user | |
parent | 8ec1f078f9c956a5887c8d19be9cf4f50320d84d (diff) | |
download | brdo-77c08ef4cb01420e98dc759ada692a08acfbadb3.tar.gz brdo-77c08ef4cb01420e98dc759ada692a08acfbadb3.tar.bz2 |
Issue #1864216 by larowlan, marvin_B8: Fixed No docblock for several functions in user.module.
Diffstat (limited to 'modules/user')
-rw-r--r-- | modules/user/user.module | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 07ce1bef0..c1c7ec218 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1517,15 +1517,33 @@ function theme_user_list($variables) { return theme('item_list', array('items' => $items, 'title' => $title)); } +/** + * Determines if the current user is anonymous. + * + * @return bool + * TRUE if the user is anonymous, FALSE if the user is authenticated. + */ function user_is_anonymous() { // Menu administrators can see items for anonymous when administering. return !$GLOBALS['user']->uid || !empty($GLOBALS['menu_admin']); } +/** + * Determines if the current user is logged in. + * + * @return bool + * TRUE if the user is logged in, FALSE if the user is anonymous. + */ function user_is_logged_in() { return (bool) $GLOBALS['user']->uid; } +/** + * Determines if the current user has access to the user registration page. + * + * @return bool + * TRUE if the user is not already logged in and can register for an account. + */ function user_register_access() { return user_is_anonymous() && variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL); } |