BUG 10925 When login with wrong credentials error should be generic. SOLVED

- When login with wrong credentials currently the error message is specific to what the login error is ("WARNING: User not registered!" for wrong User name and "WARNING: Wrong password" for wrong password).
- Changed Message Wrong login to generic.
This commit is contained in:
Hector Cortez
2013-03-04 11:32:49 -04:00
parent 7a73a274e1
commit ba70cf04a7

View File

@@ -46,12 +46,11 @@ try {
switch ($uid) { switch ($uid) {
//The user does doesn't exist //The user does doesn't exist
case -1: case -1:
$errLabel = 'ID_USER_NOT_REGISTERED'; $errLabel = 'WRONG_LOGIN_CREDENTIALS';
break; break;
//The password is incorrect //The password is incorrect
case -2: case -2:
$errLabel = 'ID_WRONG_PASS'; $errLabel = 'WRONG_LOGIN_CREDENTIALS';
if (isset($_SESSION['__AUTH_ERROR__'])) { if (isset($_SESSION['__AUTH_ERROR__'])) {
G::SendMessageText($_SESSION['__AUTH_ERROR__'], "warning"); G::SendMessageText($_SESSION['__AUTH_ERROR__'], "warning");
unset($_SESSION['__AUTH_ERROR__']); unset($_SESSION['__AUTH_ERROR__']);
@@ -87,7 +86,7 @@ try {
//to avoid empty string in user field. This will avoid a weird message "this row doesn't exist" //to avoid empty string in user field. This will avoid a weird message "this row doesn't exist"
if ( !isset($uid) ) { if ( !isset($uid) ) {
$uid = -1; $uid = -1;
$errLabel = 'ID_USER_NOT_REGISTERED'; $errLabel = 'WRONG_LOGIN_CREDENTIALS';
} }
if (!isset($uid) || $uid < 0) { if (!isset($uid) || $uid < 0) {