You are here

public static function MoAuthUtilities::check_for_userID in Google Authenticator / 2 Factor Authentication - 2FA 8

Same name and namespace in other branches
  1. 8.2 src/MoAuthUtilities.php \Drupal\miniorange_2fa\MoAuthUtilities::check_for_userID()
1 call to MoAuthUtilities::check_for_userID()
miniorange_2fa_inline_registration::handle_page_five_submit in src/Form/miniorange_2fa_inline_registration.php

File

src/MoAuthUtilities.php, line 334
This file is part of miniOrange 2FA module.

Class

MoAuthUtilities

Namespace

Drupal\miniorange_2fa

Code

public static function check_for_userID($user_id) {
  $connection = \Drupal::database();
  $query = $connection
    ->query("SELECT * FROM {UserAuthenticationType} where uid = {$user_id}");
  $query->allowRowCount = TRUE;
  if ($query
    ->rowCount() > 0) {
    return TRUE;
  }
  return FALSE;
}