@@ -1070,7 +1070,7 @@ function user_login_validate($form_id, $form_values) {
if(!$user->uid){
form_set_error('name',t('Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>',array('@password'=>url('user/password'))));
watchdog('user',t('Login attempt failed for %user.',array('%user'=>$form_values['name'])));
watchdog('user','Login attempt failed for %user.',array('%user'=>$form_values['name']));
}
}
}
...
...
@@ -1079,15 +1079,7 @@ function user_login_validate($form_id, $form_values) {
functionuser_login_submit($form_id,$form_values){
global$user;
if($user->uid){
// To handle the edge case where this function is called during a
// bootstrap, check for the existence of t().
if(function_exists('t')){
$message=t('Session opened for %name.',array('%name'=>$user->name));
}
else{
$message="Session opened for ".check_plain($user->name);
}
watchdog('user',$message);
watchdog('user','Session opened for %name.',array('%name'=>$user->name));
// Update the user table timestamp noting user has logged in.
db_query("UPDATE {users} SET login = %d WHERE uid = %d",time(),$user->uid);
...
...
@@ -1119,7 +1111,7 @@ function user_authenticate($name, $pass) {
watchdog('user',t('Password reset instructions mailed to %name at %email.',array('%name'=>$account->name,'%email'=>$account->mail)));
watchdog('user','Password reset instructions mailed to %name at %email.',array('%name'=>$account->name,'%email'=>$account->mail));
drupal_set_message(t('Further instructions have been sent to your e-mail address.'));
}
else{
watchdog('user',t('Error mailing password reset instructions to %name at %email.',array('%name'=>$account->name,'%email'=>$account->mail)),WATCHDOG_ERROR);
watchdog('user','Error mailing password reset instructions to %name at %email.',array('%name'=>$account->name,'%email'=>$account->mail),WATCHDOG_ERROR);
drupal_set_message(t('Unable to send mail. Please contact the site admin.'));