mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-18293 $DB->something is using exceptions, no need for ifs there, removing useless strings
This commit is contained in:
parent
7826abc79f
commit
2a7eff41ad
8 changed files with 30 additions and 59 deletions
|
@ -36,15 +36,12 @@ if (empty($preferences['newemailattemptsleft'])) {
|
|||
print_continue("$CFG->wwwroot/user/view.php?id=$user->id");
|
||||
} else {
|
||||
// update user email
|
||||
if (!$DB->set_field('user', 'email', $user->email, array('id' => $user->id))) {
|
||||
print_error('cannotupdateuser');
|
||||
} else {
|
||||
events_trigger('user_updated', $user);
|
||||
$a->email = $user->email;
|
||||
$stremailupdatesuccess = get_string('auth_emailupdatesuccess', 'auth', $a);
|
||||
print_box($stremailupdatesuccess, 'center');
|
||||
print_continue("$CFG->wwwroot/user/view.php?id=$user->id");
|
||||
}
|
||||
$DB->set_field('user', 'email', $user->email, array('id' => $user->id));
|
||||
events_trigger('user_updated', $user);
|
||||
$a->email = $user->email;
|
||||
$stremailupdatesuccess = get_string('auth_emailupdatesuccess', 'auth', $a);
|
||||
print_box($stremailupdatesuccess, 'center');
|
||||
print_continue("$CFG->wwwroot/user/view.php?id=$user->id");
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue