diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-11-29 16:48:12 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-11-29 16:48:12 +0000 |
commit | 73809f0c1dd345e572b2cea9503454f3a1bb2a12 (patch) | |
tree | cd53bb3ae4354a313880cddc12c94d79c2006685 /lib/class/api.class.php | |
parent | 56fa0e31ad67ea337fd8c575ddf6e80094454eb8 (diff) | |
download | ampache-73809f0c1dd345e572b2cea9503454f3a1bb2a12.tar.gz ampache-73809f0c1dd345e572b2cea9503454f3a1bb2a12.tar.bz2 ampache-73809f0c1dd345e572b2cea9503454f3a1bb2a12.zip |
improved error messages for api, includes additional information on handshake failure, also translate the errors
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r-- | lib/class/api.class.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 9e1f8f46..7da358f5 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -49,12 +49,14 @@ class Api { if (intval($version) < self::$version) { debug_event('API','Login Failed version too old','1'); + Error::add('api','Login Failed versoin too old'); return false; } // If the timestamp is over 2hr old sucks to be them if ($timestamp < (time() - 14400)) { debug_event('API','Login Failed, timestamp too old','1'); + Error::add('api','Login Failed, timestamp too old'); return false; } @@ -93,6 +95,7 @@ class Api { if (!$row['password']) { debug_event('API','Unable to find user with username of ' . $user_id,'1'); + Error::add('api','Invalid Username/Password'); return false; } @@ -137,6 +140,7 @@ class Api { } // end while debug_event('API','Login Failed, unable to match passphrase','1'); + Error::add('api','Invalid Username/Password'); return false; } // handhsake |