You are here

public function Session::execute in DRD Agent 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Agent/Action/Session.php \Drupal\drd_agent\Agent\Action\Session::execute()

Execute an action.

Return value

mixed The response of the action as an array which will be encrypted before returned to DRD.

Overrides Base::execute

File

src/Agent/Action/Session.php, line 15

Class

Session
Provides a 'Session' code.

Namespace

Drupal\drd_agent\Agent\Action

Code

public function execute() {

  /** @var \Drupal\user\UserInterface $account */
  $account = User::load(1);
  return [
    'url' => user_pass_reset_url($account) . '/login?destination=/admin',
  ];
}