public static function getLogin() { $user = $_SESSION['User']; $auth = Current_User::getAuthorization(); if (empty($auth)) { throw new Exception(t('Failed to retrieve the current authorization: %s', $_SESSION['User']->auth_script)); } // If the current user is not verified then // either force to authentication page or clear the user session if (!$auth->verify()) { // reset user session is set if ($user->id) { Current_User::init(); } // if they are force login, the below will send them there // and we will end getLogin // if not forced, then we just continue; $auth->forceLogin(); } PHPWS_Core::initModClass('users', 'User_Form.php'); $login = User_Form::logBox(); if (!empty($login)) { Layout::set($login, 'users', 'login_box', false); } }