You are here

public function AuthenticationController::editProfile in Janrain Registration 8

Edit profile page.

1 string reference to 'AuthenticationController::editProfile'
janrain_capture.routing.yml in ./janrain_capture.routing.yml
janrain_capture.routing.yml

File

src/Controller/AuthenticationController.php, line 67

Class

AuthenticationController
Authentication controller.

Namespace

Drupal\janrain_capture\Controller

Code

public function editProfile() {
  $access_token = $this->captureApi
    ->getAccessToken();
  $return = $this->markupBuilder
    ->getScreenRenderArray('edit-profile');
  $return['janrain_capture_edit_js'] = [
    '#markup' => '<script>var access_token = "' . $access_token . '";</script>',
    '#allowed_tags' => [
      'script',
    ],
    '#cache' => [
      'contexts' => [
        'user',
      ],
      'max-age' => 60,
    ],
  ];
  return $return;
}