19declare(strict_types=1);
42 'token' => [
'text',
$token]
59 if (hash(
'md5', $user->
getId() .
'-' . $user->
getEmail()) !== $received_token) {
63 $query = $this->db->queryF(
64 'SELECT `new_email` FROM `' . self::TABLE_NAME .
'` WHERE `token` = %s AND `valid_until` >= %s',
66 [$received_token, time()]
80 $query =
'DELETE FROM `' . self::TABLE_NAME .
'` WHERE `token` = %s';
86 $query =
'DELETE FROM `' . self::TABLE_NAME .
'` WHERE `valid_until` <= %s';
An exception for terminatinating execution or to throw for unit testing.
getNewTokenForUser(\ilObjUser $user, string $new_email)
deleteEntryByToken(string $token)
__construct(\ilDBInterface $db)
getNewEmailForUser(\ilObjUser $user, string $received_token)
This Function will check if the token is actually valid for the given user before returning the new e...
getEmail()
get email address @access public
getId()
get object id @access public
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...