public function ForcePasswordChangeMapper::addFirstTimeLogin in Force Password Change 2.0.x
Same name and namespace in other branches
- 8 src/Mapper/ForcePasswordChangeMapper.php \Drupal\force_password_change\Mapper\ForcePasswordChangeMapper::addFirstTimeLogin()
Set a user as having been forced to change their password on their first login.
Parameters
int $uid: The User ID of the user who has been forced to change their password on first login.
Overrides ForcePasswordChangeMapperInterface::addFirstTimeLogin
File
- src/
Mapper/ ForcePasswordChangeMapper.php, line 194
Class
Namespace
Drupal\force_password_change\MapperCode
public function addFirstTimeLogin($uid) {
$this->connection
->query('INSERT INTO {force_password_change_uids} (category, uid) VALUES (:category, :uid)', [
':category' => 'first_login',
':uid' => $uid,
]);
}