mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Don't allow password changing if the user isn't confirmed yet
This commit is contained in:
parent
8fdd5ab2b3
commit
5c0567b4cd
1 changed files with 4 additions and 0 deletions
|
@ -44,6 +44,10 @@
|
||||||
error("No such user with this address: $frm->email");
|
error("No such user with this address: $frm->email");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($user->confirmed)) {
|
||||||
|
error(get_string("confirmednot"));
|
||||||
|
}
|
||||||
|
|
||||||
$user->secret = random_string(15);
|
$user->secret = random_string(15);
|
||||||
|
|
||||||
if (!set_field("user", "secret", $user->secret, "id", $user->id)) {
|
if (!set_field("user", "secret", $user->secret, "id", $user->id)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue