summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/auth.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-02-06 11:32:53 -0800
committerAndy Staudacher <andy.st@gmail.com>2010-02-06 11:32:53 -0800
commit4977c00db1b812abad5ad2d530e1dd44171b6d85 (patch)
tree4abab0ff9bb6951f8a53b49ea8d2f494a48140d0 /modules/gallery/helpers/auth.php
parent31aaf7555f51dd80cf1e97fd3c20a1c245cbf61b (diff)
parent15e22076552929bf1f45888945f65de621aa2aac (diff)
Merge commit 'upstream/master'
Diffstat (limited to 'modules/gallery/helpers/auth.php')
-rw-r--r--modules/gallery/helpers/auth.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/gallery/helpers/auth.php b/modules/gallery/helpers/auth.php
index 16f8915a..45561861 100644
--- a/modules/gallery/helpers/auth.php
+++ b/modules/gallery/helpers/auth.php
@@ -78,10 +78,16 @@ class auth_Core {
}
}
+ static function validate_too_many_failed_password_changes($password_input) {
+ if (self::too_many_failed_logins(identity::active_user()->name)) {
+ $password_input->add_error("too_many_failed_password_changes", 1);
+ }
+ }
+
/**
* Record a failed login for this user
*/
- static function record_failed_login($name) {
+ static function record_failed_auth_attempts($name) {
$failed_login = ORM::factory("failed_login")
->where("name", "=", $name)
->find();
@@ -96,7 +102,7 @@ class auth_Core {
/**
* Clear any failed logins for this user
*/
- static function record_successful_login($user) {
+ static function clear_failed_auth_attempts($user) {
db::build()
->delete("failed_logins")
->where("name", "=", $user->name)