Changeset 25018 for trunk/password.php
- Timestamp:
- Oct 19, 2013, 7:43:04 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/password.php
r25005 r25018 54 54 if (empty($_POST['username_or_email'])) 55 55 { 56 array_push($page['errors'], l10n('Invalid username or email'));56 $page['errors'][] = l10n('Invalid username or email'); 57 57 return false; 58 58 } … … 67 67 if (!is_numeric($user_id)) 68 68 { 69 array_push($page['errors'], l10n('Invalid username or email'));69 $page['errors'][] = l10n('Invalid username or email'); 70 70 return false; 71 71 } … … 77 77 if (is_a_guest($status) or is_generic($status)) 78 78 { 79 array_push($page['errors'], l10n('Password reset is not allowed for this user'));79 $page['errors'][] = l10n('Password reset is not allowed for this user'); 80 80 return false; 81 81 } … … 83 83 if (empty($userdata['email'])) 84 84 { 85 array_push( 86 $page['errors'], 87 l10n( 88 'User "%s" has no email address, password reset is not possible', 89 $userdata['username'] 90 ) 85 $page['errors'][] = l10n( 86 'User "%s" has no email address, password reset is not possible', 87 $userdata['username'] 91 88 ); 92 89 return false; … … 131 128 if (pwg_mail($userdata['email'], $email_params)) 132 129 { 133 array_push($page['infos'], l10n('Check your email for the confirmation link'));130 $page['infos'][] = l10n('Check your email for the confirmation link'); 134 131 return true; 135 132 } 136 133 else 137 134 { 138 array_push($page['errors'], l10n('Error sending email'));135 $page['errors'][] = l10n('Error sending email'); 139 136 return false; 140 137 } … … 153 150 if (!preg_match('/^[a-z0-9]{20}$/i', $key)) 154 151 { 155 array_push($page['errors'], l10n('Invalid key'));152 $page['errors'][] = l10n('Invalid key'); 156 153 return false; 157 154 } … … 168 165 if (pwg_db_num_rows($result) == 0) 169 166 { 170 array_push($page['errors'], l10n('Invalid key'));167 $page['errors'][] = l10n('Invalid key'); 171 168 return false; 172 169 } … … 176 173 if (is_a_guest($userdata['status']) or is_generic($userdata['status'])) 177 174 { 178 array_push($page['errors'], l10n('Password reset is not allowed for this user'));175 $page['errors'][] = l10n('Password reset is not allowed for this user'); 179 176 return false; 180 177 } … … 195 192 if ($_POST['use_new_pwd'] != $_POST['passwordConf']) 196 193 { 197 array_push($page['errors'], l10n('The passwords do not match'));194 $page['errors'][] = l10n('The passwords do not match'); 198 195 return false; 199 196 } … … 204 201 if (!is_numeric($user_id)) 205 202 { 206 array_push($page['errors'], l10n('Invalid key'));203 $page['errors'][] = l10n('Invalid key'); 207 204 return false; 208 205 } … … 213 210 if (is_a_guest() or is_generic()) 214 211 { 215 array_push($page['errors'], l10n('Password reset is not allowed for this user'));212 $page['errors'][] = l10n('Password reset is not allowed for this user'); 216 213 return false; 217 214 } … … 226 223 ); 227 224 228 array_push($page['infos'], l10n('Your password has been reset'));225 $page['infos'][] = l10n('Your password has been reset'); 229 226 230 227 if (isset($_GET['key'])) 231 228 { 232 array_push($page['infos'], '<a href="'.get_root_url().'identification.php">'.l10n('Login').'</a>');229 $page['infos'][] = '<a href="'.get_root_url().'identification.php">'.l10n('Login').'</a>'; 233 230 } 234 231 else 235 232 { 236 array_push($page['infos'], '<a href="'.get_gallery_home_url().'">'.l10n('Return to home page').'</a>');233 $page['infos'][] = '<a href="'.get_gallery_home_url().'">'.l10n('Return to home page').'</a>'; 237 234 } 238 235
Note: See TracChangeset
for help on using the changeset viewer.