Skip to content

Commit

Permalink
Use user API instead of direct ORM lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Sep 29, 2009
1 parent b26e84d commit 416ffe8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/user/controllers/login.php
Expand Up @@ -58,8 +58,8 @@ private function _auth($url) {
$form = user::get_login_form($url); $form = user::get_login_form($url);
$valid = $form->validate(); $valid = $form->validate();
if ($valid) { if ($valid) {
$user = ORM::factory("user")->where("name", $form->login->inputs["name"]->value)->find(); $user = user::lookup_by_name($form->login->inputs["name"]->value);
if (!$user->loaded || !user::is_correct_password($user, $form->login->password->value)) { if (!$user || !user::is_correct_password($user, $form->login->password->value)) {
log::warning( log::warning(
"user", "user",
t("Failed login for %name", t("Failed login for %name",
Expand Down

0 comments on commit 416ffe8

Please sign in to comment.