-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsaml_attribute_map.module
More file actions
40 lines (34 loc) · 1006 Bytes
/
saml_attribute_map.module
File metadata and controls
40 lines (34 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\user\UserInterface;
/**
* Implements hook_help().
*/
function saml_attribute_map_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the saml_attribute_map module.
case 'help.page.saml_attribute_map':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Maps simplesamlphp attributes to user account fields.') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_theme().
*/
function saml_attribute_map_theme() {
return [
'saml_attribute_map' => [
'template' => 'saml_attribute_map',
'render element' => 'children',
],
];
}
/**
* Implements hook_simplesamlphp_auth_user_attributes().
*/
function saml_attribute_map_simplesamlphp_auth_user_attributes(UserInterface $account, $attributes) {
return \Drupal::service('saml_attribute_map.attribute_manager')->mapAttributes($attributes);
}