You are here

public static function MoAuthUtilities::getHiddenEmail 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::getHiddenEmail()
2 calls to MoAuthUtilities::getHiddenEmail()
authenticate_user::mo_auth_build_oobemail_form in src/Form/authenticate_user.php
test_email_verification::buildForm in src/Form/test_email_verification.php
Form constructor.

File

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

Class

MoAuthUtilities

Namespace

Drupal\miniorange_2fa

Code

public static function getHiddenEmail($email) {
  $split = explode("@", $email);
  if (count($split) == 2) {
    $hidden_email = substr($split[0], 0, 1) . 'xxxxxx' . substr($split[0], -1) . '@' . $split[1];
    return $hidden_email;
  }
  return $email;
}