function user_cancel_url

Same name in other branches
  1. 9 core/modules/user/user.module \user_cancel_url()
  2. 8.9.x core/modules/user/user.module \user_cancel_url()
  3. 10 core/modules/user/user.module \user_cancel_url()
  4. 11.x core/modules/user/user.module \user_cancel_url()

Generates a URL to confirm an account cancellation request.

Parameters

object $account: The user account object, which must contain at least the following properties:

  • uid: The user ID number.
  • pass: The hashed user password string.
  • login: The UNIX timestamp of the user's last login.

Return value

A unique URL that may be used to confirm the cancellation of the user account.

See also

user_mail_tokens()

user_cancel_confirm()

1 call to user_cancel_url()
user_mail_tokens in modules/user/user.module
Token callback to add unsafe tokens for user mails.

File

modules/user/user.module, line 2423

Code

function user_cancel_url($account) {
    $timestamp = REQUEST_TIME;
    return url("user/{$account->uid}/cancel/confirm/{$timestamp}/" . user_pass_rehash($account->pass, $timestamp, $account->login, $account->uid, $account->mail), array(
        'absolute' => TRUE,
    ));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.