You are here

protected function AuthController::insertAuth0User in Auth0 Single Sign On 8

Same name and namespace in other branches
  1. 8.2 src/Controller/AuthController.php \Drupal\auth0\Controller\AuthController::insertAuth0User()

Insert the auth0 user.

1 call to AuthController::insertAuth0User()
AuthController::processUserLogin in src/Controller/AuthController.php
Process the auth0 user profile and signin or signup the user.

File

src/Controller/AuthController.php, line 451

Class

AuthController
Controller routines for auth0 authentication.

Namespace

Drupal\auth0\Controller

Code

protected function insertAuth0User($userInfo, $uid) {
  db_insert('auth0_user')
    ->fields(array(
    'auth0_id' => $userInfo['user_id'],
    'drupal_id' => $uid,
    'auth0_object' => json_encode($userInfo),
  ))
    ->execute();
}