You are here

public function UserEmailVerification::setEmailVerifiedByUserId in User email verification 8

Update verification for requested user: Set email verified.

Parameters

int $uid: User ID.

Overrides UserEmailVerificationInterface::setEmailVerifiedByUserId

File

src/UserEmailVerification.php, line 276

Class

UserEmailVerification
User email verification helper service.

Namespace

Drupal\user_email_verification

Code

public function setEmailVerifiedByUserId($uid) {
  return $this->database
    ->update(UserEmailVerificationInterface::VERIFICATION_TABLE_NAME)
    ->condition('uid', $uid, '=')
    ->fields([
    'verified' => $this->time
      ->getRequestTime(),
  ])
    ->execute();
}