You are here

public static function LogintobogganUtility::emlValidateUrl in LoginToboggan 8

Generates a url for an email token.

Parameters

object $account: User account.

array $url_options: Any extra URL options.

1 call to LogintobogganUtility::emlValidateUrl()
logintoboggan_tokens in ./logintoboggan.tokens.inc
Implements hook_tokens().

File

src/Utility/LogintobogganUtility.php, line 60

Class

LogintobogganUtility
Class for utility methods.

Namespace

Drupal\logintoboggan\Utility

Code

public static function emlValidateUrl($account, array $url_options) {
  $request_time = \Drupal::time()
    ->getRequestTime();
  return Url::fromUserInput('/user/validate/' . $account
    ->id() . '/' . $request_time . '/' . user_pass_rehash($account, $request_time), $url_options)
    ->toString();
}