1.20.x user.module user_register_access()

Determines if the current user has access to the user registration page.

Return value

bool: TRUE if the user is not already logged in and can register for an account.

File

modules/user/user.module, line 1271
Enables the user registration and login system.

Code

function user_register_access() {
  return user_is_anonymous() && config_get('system.core', 'user_register') !== USER_REGISTER_ADMINISTRATORS_ONLY;
}