You are here

public function ForcePasswordChangeMapper::addFirstTimeLogin in Force Password Change 2.0.x

Same name and namespace in other branches
  1. 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

ForcePasswordChangeMapper

Namespace

Drupal\force_password_change\Mapper

Code

public function addFirstTimeLogin($uid) {
  $this->connection
    ->query('INSERT INTO {force_password_change_uids} (category, uid) VALUES (:category, :uid)', [
    ':category' => 'first_login',
    ':uid' => $uid,
  ]);
}