function ServerCommand::getOneTimeLoginUrl
Same name in other branches
- 8.9.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()
- 11.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.
File
-
core/
lib/ Drupal/ Core/ Command/ ServerCommand.php, line 187
Class
- ServerCommand
- Runs the PHP webserver for a Drupal site for local testing/development.
Namespace
Drupal\Core\CommandCode
protected function getOneTimeLoginUrl() {
$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.