summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/auth.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-02-03 13:48:34 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-02-03 13:48:34 +0000
commit052476ef44ca801766cbd6bdbfe42d5a0a362e52 (patch)
treef7a1d39fe4aae154e916e2cd4c02a798aef6c67f /modules/gallery/helpers/auth.php
parent92d211bae653b6c94e0038b1a47734a1acaa149e (diff)
parent99a7f470b93d35717f8d5979d05da6cf05a1dd20 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
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..717cf40a 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_logins($user) {
db::build()
->delete("failed_logins")
->where("name", "=", $user->name)