function ServerCommand::getOneTimeLoginUrl
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Command/ServerCommand.php \Drupal\Core\Command\ServerCommand::getOneTimeLoginUrl()
- 10 core/lib/Drupal/Core/Command/ServerCommand.php \Drupal\Core\Command\ServerCommand::getOneTimeLoginUrl()
- 9 core/lib/Drupal/Core/Command/ServerCommand.php \Drupal\Core\Command\ServerCommand::getOneTimeLoginUrl()
- 8.9.x core/lib/Drupal/Core/Command/ServerCommand.php \Drupal\Core\Command\ServerCommand::getOneTimeLoginUrl()
Gets a one time login URL for user 1.
Return value
string The one time login URL for user 1.
Deprecated
in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement.
See also
https://www.drupal.org/node/3581062
File
-
core/
lib/ Drupal/ Core/ Command/ ServerCommand.php, line 192
Class
- ServerCommand
- Runs the PHP webserver for a Drupal site for local testing/development.
Namespace
Drupal\Core\CommandCode
protected function getOneTimeLoginUrl() {
@trigger_error(__METHOD__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3581062', E_USER_DEPRECATED);
$user = User::load(1);
\Drupal::moduleHandler()->load('user');
return user_pass_reset_url($user);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.