@@ -852,14 +852,14 @@ discard block |
||
| 852 | 852 | $email = false; |
| 853 | 853 | } |
| 854 | 854 | |
| 855 | - if ($email) { |
|
| 856 | - $condition = "LOWER(email) = '".Database::escape_string($username)."' "; |
|
| 857 | - } else { |
|
| 855 | + if ($email) { |
|
| 856 | + $condition = "LOWER(email) = '".Database::escape_string($username)."' "; |
|
| 857 | + } else { |
|
| 858 | 858 | $condition = "LOWER(username) = '".Database::escape_string($username)."'"; |
| 859 | 859 | } |
| 860 | 860 | |
| 861 | - $tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
| 862 | - $query = "SELECT |
|
| 861 | + $tbl_user = Database :: get_main_table(TABLE_MAIN_USER); |
|
| 862 | + $query = "SELECT |
|
| 863 | 863 | user_id AS uid, |
| 864 | 864 | lastname AS lastName, |
| 865 | 865 | firstname AS firstName, |
@@ -874,7 +874,7 @@ discard block |
||
| 874 | 874 | auth_source |
| 875 | 875 | FROM $tbl_user |
| 876 | 876 | WHERE ( $condition AND active = 1) "; |
| 877 | - $result = Database::query($query); |
|
| 877 | + $result = Database::query($query); |
|
| 878 | 878 | $num_rows = Database::num_rows($result); |
| 879 | 879 | if ($result && $num_rows > 0) { |
| 880 | 880 | return Database::fetch_assoc($result); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | Display::addFlash( |
| 48 | 48 | Display::return_message($messageText, 'info', false) |
| 49 | 49 | ); |
| 50 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
| 50 | + header('Location: '.api_get_path(WEB_PATH)); |
|
| 51 | 51 | exit; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | Display::addFlash( |
| 75 | 75 | Display::return_message($messageText, 'error', false) |
| 76 | 76 | ); |
| 77 | - header('Location: ' . api_get_self()); |
|
| 77 | + header('Location: '.api_get_self()); |
|
| 78 | 78 | exit; |
| 79 | 79 | } |
| 80 | 80 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | Display::addFlash( |
| 95 | 95 | Display::return_message($messageText, 'info', false) |
| 96 | 96 | ); |
| 97 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
| 97 | + header('Location: '.api_get_path(WEB_PATH)); |
|
| 98 | 98 | exit; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | Display::addFlash( |
| 103 | 103 | Display::return_message(get_lang('CouldNotResetPassword'), 'info', false) |
| 104 | 104 | ); |
| 105 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
| 105 | + header('Location: '.api_get_path(WEB_PATH)); |
|
| 106 | 106 | exit; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | exit; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
| 124 | + header('Location: '.api_get_path(WEB_PATH)); |
|
| 125 | 125 | exit; |
| 126 | 126 | } |
| 127 | 127 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | Display::addFlash( |
| 139 | 139 | Display::return_message($messageText, 'info', false) |
| 140 | 140 | ); |
| 141 | - header('Location: ' . api_get_path(WEB_PATH)); |
|
| 141 | + header('Location: '.api_get_path(WEB_PATH)); |
|
| 142 | 142 | exit; |
| 143 | 143 | } |
| 144 | 144 | |