public function KeyAuthTestController::test in Key auth 8
Print the current user's name to the page.
Return value
string The user name of the current logged in user.
1 string reference to 'KeyAuthTestController::test'
- key_auth_test.routing.yml in tests/
key_auth_test/ key_auth_test.routing.yml - tests/key_auth_test/key_auth_test.routing.yml
File
- tests/
key_auth_test/ src/ Controller/ KeyAuthTestController.php, line 18
Class
- KeyAuthTestController
- Test controller for key authentication.
Namespace
Drupal\key_auth_test\ControllerCode
public function test() {
$account = $this
->currentUser();
return [
'#markup' => $account
->getAccountName() . ' - ' . round(microtime(TRUE) * 1000),
];
}