class CasloginAction extends Action
{
- function handle($args)
+ function handle()
{
- parent::handle($args);
+ parent::handle();
if (common_is_real_login()) {
// TRANS: Client error displayed when trying to log in while already logged on.
$this->clientError(_m('Already logged in.'));
phpCAS::handleLogoutRequests();
phpCAS::forceAuthentication();
global $casTempPassword;
- $casTempPassword = common_good_rand(16);
+ $casTempPassword = common_random_hexstr(16);
$user = common_check_user(phpCAS::getUser(), $casTempPassword);
if (!$user) {
// TRANS: Server error displayed when trying to log in with incorrect username or password.
$this->serverError(_m('Incorrect username or password.'));
- return;
}
// success!
if (!common_set_user($user)) {
// TRANS: Server error displayed when login fails in CAS authentication plugin.
$this->serverError(_m('Error setting user. You are probably not authorized.'));
- return;
}
common_real_login(true);