diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 13:09:20 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-22 13:11:03 -0700 |
commit | 3c936d661a088fb43b47eb5b208958180e8f65eb (patch) | |
tree | 1a117dc1bfe54bec44f664cbd7c5f8c93aa5e993 /modules/gallery/controllers/login.php | |
parent | 4cb9ec1d6d37b49ebafc68d0a94d794a1acb8b28 (diff) |
Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class
Diffstat (limited to 'modules/gallery/controllers/login.php')
-rw-r--r-- | modules/gallery/controllers/login.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/controllers/login.php b/modules/gallery/controllers/login.php index 4c83d647..86e2b0a4 100644 --- a/modules/gallery/controllers/login.php +++ b/modules/gallery/controllers/login.php @@ -58,8 +58,8 @@ class Login_Controller extends Controller { $form = login::get_login_form($url); $valid = $form->validate(); if ($valid) { - $user = Identity::lookup_user_by_name($form->login->inputs["name"]->value); - if (empty($user) || !Identity::is_correct_password($user, $form->login->password->value)) { + $user = identity::lookup_user_by_name($form->login->inputs["name"]->value); + if (empty($user) || !identity::is_correct_password($user, $form->login->password->value)) { log::warning( "user", t("Failed login for %name", @@ -70,12 +70,12 @@ class Login_Controller extends Controller { } if ($valid) { - if (Identity::is_writable()) { + if (identity::is_writable()) { $user->login_count += 1; $user->last_login = time(); $user->save(); } - Session::set_active_user($user); + identity::set_active_user($user); log::info("user", t("User %name logged in", array("name" => $user->name))); } |