diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-08-21 02:45:43 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-08-21 02:45:43 +0000 |
commit | fcd6756369cc7b557a5db5a9566661109430bb8c (patch) | |
tree | 8652a65b7348c7fd416afb155a3a57f78c4c4eca /login.php | |
parent | a6a8c08e3721962fd2dc5cfdc6efc1803e844a2b (diff) | |
download | ampache-fcd6756369cc7b557a5db5a9566661109430bb8c.tar.gz ampache-fcd6756369cc7b557a5db5a9566661109430bb8c.tar.bz2 ampache-fcd6756369cc7b557a5db5a9566661109430bb8c.zip |
sync from branch
Diffstat (limited to 'login.php')
-rw-r--r-- | login.php | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -64,10 +64,16 @@ if ($_POST['username'] && $_POST['password']) { $auth = vauth::authenticate($username, $password); $user = User::get_from_username($username); + if (!$auth['succes']) { + debug_event('Login',scrub_out($username) . ' attempted to login and failed','1'); + } + if ($user->disabled == '1') { - $auth['success'] = false; - Error::add('general',_('User Disabled please contact Admin')); + $auth['success'] = false; + Error::add('general',_('User Disabled please contact Admin')); + debug_event('Login',scrub_out($username) . ' is disabled and attempted to login','1'); } // if user disabled + elseif (!$user->username AND $auth['success']) { /* This is run if we want to auto_create users who don't exist (usefull for non mysql auth) */ |