summaryrefslogtreecommitdiffstats
path: root/login.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-21 02:45:43 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-08-21 02:45:43 +0000
commitfcd6756369cc7b557a5db5a9566661109430bb8c (patch)
tree8652a65b7348c7fd416afb155a3a57f78c4c4eca /login.php
parenta6a8c08e3721962fd2dc5cfdc6efc1803e844a2b (diff)
downloadampache-fcd6756369cc7b557a5db5a9566661109430bb8c.tar.gz
ampache-fcd6756369cc7b557a5db5a9566661109430bb8c.tar.bz2
ampache-fcd6756369cc7b557a5db5a9566661109430bb8c.zip
sync from branch
Diffstat (limited to 'login.php')
-rw-r--r--login.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/login.php b/login.php
index cc402cc8..a313bdbd 100644
--- a/login.php
+++ b/login.php
@@ -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) */