function email_confirm_confirmation_email_url_path in Email Change Confirmation 7
Generate the path part of a URL to confirm an email address change request.
Parameters
string $mail: The new email address.
int $uid: The uid of the account changing their email.
int $timestamp: Unix timestamp (e.g. from time()).
Return value
string Path to wrap in `url($return, ['absolute' => TRUE])` to get a full url.
3 calls to email_confirm_confirmation_email_url_path()
- EmailConfirmTestCase::testChangeEmail in tests/
email_confirm.test - Tests basic email change success for non-admin user.
- EmailConfirmTestCase::testChangeEmailVariations in tests/
email_confirm.test - Tests email change failure cases for non-admin user.
- email_confirm_build_mail in ./
email_confirm.module - Build and send out the confirmation emails.
File
- ./
email_confirm.module, line 487 - The Email Change Confirmation module.
Code
function email_confirm_confirmation_email_url_path($mail, $uid, $timestamp = NULL) {
// Use time() here instead of REQUEST_TIME as it allows tests to work, the
// performance impact is minimal, there's no benefit to avoiding time drift
// during a page request in this code.
$timestamp = !empty($timestamp) ? $timestamp : time();
$hash = email_confirm_user_email_rehash($mail, $timestamp, $uid);
return 'user/change-mail/' . $uid . '/' . $timestamp . '/' . $hash;
}