mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-14679 fixed remaining old style set_field()s
This commit is contained in:
parent
dd88de0ebd
commit
f685e83030
26 changed files with 82 additions and 167 deletions
|
@ -131,12 +131,8 @@ class auth_plugin_email extends auth_plugin_base {
|
|||
return AUTH_CONFIRM_ERROR;
|
||||
|
||||
} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
|
||||
if (!$DB->set_field("user", "confirmed", 1, array("id"=>$user->id))) {
|
||||
return AUTH_CONFIRM_FAIL;
|
||||
}
|
||||
if (!$DB->set_field("user", "firstaccess", time(), array("id"=>$user->id))) {
|
||||
return AUTH_CONFIRM_FAIL;
|
||||
}
|
||||
$DB->set_field("user", "confirmed", 1, array("id"=>$user->id));
|
||||
$DB->set_field("user", "firstaccess", time(), array("id"=>$user->id));
|
||||
return AUTH_CONFIRM_OK;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -549,12 +549,8 @@ class auth_plugin_ldap extends auth_plugin_base {
|
|||
if (!$this->user_activate($username)) {
|
||||
return AUTH_CONFIRM_FAIL;
|
||||
}
|
||||
if (!$DB->set_field('user', 'confirmed', 1, array('id'=>$user->id))) {
|
||||
return AUTH_CONFIRM_FAIL;
|
||||
}
|
||||
if (!$DB->set_field('user', 'firstaccess', time(), array('id'=>$user->id))) {
|
||||
return AUTH_CONFIRM_FAIL;
|
||||
}
|
||||
$DB->set_field('user', 'confirmed', 1, array('id'=>$user->id));
|
||||
$DB->set_field('user', 'firstaccess', time(), array('id'=>$user->id));
|
||||
return AUTH_CONFIRM_OK;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -137,12 +137,8 @@ class auth_plugin_manual extends auth_plugin_base {
|
|||
if ($user->confirmed) {
|
||||
return AUTH_CONFIRM_ALREADY;
|
||||
} else {
|
||||
if (!$DB->set_field("user", "confirmed", 1, array("id"=>$user->id))) {
|
||||
return AUTH_CONFIRM_FAIL;
|
||||
}
|
||||
if (!$DB->set_field("user", "firstaccess", time(), array("id"=>$user->id))) {
|
||||
return AUTH_CONFIRM_FAIL;
|
||||
}
|
||||
$DB->set_field("user", "confirmed", 1, array("id"=>$user->id));
|
||||
$DB->set_field("user", "firstaccess", time(), array("id"=>$user->id));
|
||||
return AUTH_CONFIRM_OK;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue