saml_sp-8.x-3.x-dev/modules/saml_sp_drupal_login/saml_sp_drupal_login.api.inc

modules/saml_sp_drupal_login/saml_sp_drupal_login.api.inc
<?php

/**
 * @file
 * API hooks for SAML Service Provider Drupal Login module.
 */

use Drupal\user\UserInterface;

/**
 * Called when the user logs in to allow processing of the attributes passed in
 * from the SAML IdP.
 *
 * @param \Drupal\user\UserInterface $user
 *   The logged-in user.
 * @param array $attributes
 *   User attributes as reported by the IdP.
 *
 * @throws \Drupal\Core\Entity\EntityStorageException
 */
function hook_saml_sp_drupal_login_user_attributes(UserInterface $user, array $attributes) {
  // Do something with the user account.
  // Make sure you save the $user object or the changes won't stick.
  $user->save();
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc