summaryrefslogtreecommitdiff
path: root/modules/user/controllers/login.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-05 14:04:27 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-05 16:28:16 -0700
commit194cc3b27a73afe5119da9f09407c1e068dc6fa3 (patch)
tree08d4830e7491ba6206d231858766f5d713ce971d /modules/user/controllers/login.php
parent08c01fec6cc590eb578522164de81114b889c4b5 (diff)
First pass on converting calls to the Identity interface. Will worry about writes and saves later.
Convert the Admin_User controller Convert the login and password change controller Change the item model to call user::lookup to get the owner. On the log model, delete the relationship between the log and user table, and replace with a call to user::lookup
Diffstat (limited to 'modules/user/controllers/login.php')
-rw-r--r--modules/user/controllers/login.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/user/controllers/login.php b/modules/user/controllers/login.php
index 8bee7db5..2c4bd557 100644
--- a/modules/user/controllers/login.php
+++ b/modules/user/controllers/login.php
@@ -53,13 +53,12 @@ class Login_Controller extends Controller {
print $form;
}
}
-
private function _auth($url) {
$form = user::get_login_form($url);
$valid = $form->validate();
if ($valid) {
- $user = ORM::factory("user")->where("name", $form->login->inputs["name"]->value)->find();
- if (!$user->loaded || !user::is_correct_password($user, $form->login->password->value)) {
+ $user = user::lookup_by_name($form->login->inputs["name"]->value);
+ if (empty($user) || !user::is_correct_password($user, $form->login->password->value)) {
log::warning(
"user",
t("Failed login for %name",