You are here

public function UserPasswordResetTestCase::getConfirmURL in Drupal 7

Turns a password reset URL into a 'confirm' URL.

3 calls to UserPasswordResetTestCase::getConfirmURL()
UserPasswordResetTestCase::testResetImpersonation in modules/user/user.test
Make sure that users cannot forge password reset URLs of other users.
UserPasswordResetTestCase::testUserPasswordReset in modules/user/user.test
Tests password reset functionality.
UserPasswordResetTestCase::testUserPasswordResetLoggedIn in modules/user/user.test
Test user password reset while logged in.

File

modules/user/user.test, line 518
Tests for user.module.

Class

UserPasswordResetTestCase
Tests resetting a user password.

Code

public function getConfirmURL($reset_url) {

  // Last part is always the hash; replace with "confirm".
  $parts = explode('/', $reset_url);
  array_pop($parts);
  array_push($parts, 'confirm');
  return implode('/', $parts);
}