Bugfix: non-existent username is now handled correctly.
This commit is contained in:
parent
7b08806827
commit
a122d4801b
1 changed files with 9 additions and 4 deletions
|
|
@ -404,11 +404,16 @@ sub www_login {
|
|||
my ($cmd, $uid, $success, $u);
|
||||
|
||||
($uid) = WebGUI::SQL->quickArray("select userId from users where username=".quote($session{form}{username}));
|
||||
$u = WebGUI::User->new($uid);
|
||||
|
||||
$cmd = $session{authentication}{$u->authMethod}."::validateUser";
|
||||
$success = eval{&$cmd($uid, $session{form}{identifier})};
|
||||
WebGUI::ErrorHandler::fatalError("Unable to load method validateUser on Authentication module: $_. ".$@) if($@);
|
||||
if ($uid) {
|
||||
$u = WebGUI::User->new($uid);
|
||||
|
||||
$cmd = $session{authentication}{$u->authMethod}."::validateUser";
|
||||
$success = eval{&$cmd($uid, $session{form}{identifier})};
|
||||
WebGUI::ErrorHandler::fatalError("Unable to load method validateUser on Authentication module: $_. ".$@) if($@);
|
||||
} else {
|
||||
$success = WebGUI::International::get(68);
|
||||
}
|
||||
|
||||
if ($success == 1) {
|
||||
WebGUI::Session::start($uid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue