1 | <?php |
||
7 | class SAMLMemberExtension extends DataExtension |
||
|
|||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | private static $db = [ |
||
13 | // Pointer to the session object held by the IdP |
||
14 | 'SAMLSessionIndex' => 'Varchar(255)', |
||
15 | // Unique user identifier, same field is used by LDAPMemberExtension |
||
16 | 'GUID' => 'Varchar(50)', |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * These are used by {@link SAMLController} to map specific IdP claim rules |
||
21 | * to {@link Member} fields. Availability of these claim rules are defined |
||
22 | * on the IdP. |
||
23 | * |
||
24 | * @var array |
||
25 | * @config |
||
26 | */ |
||
27 | private static $claims_field_mappings = [ |
||
28 | 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname' => 'FirstName', |
||
29 | 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname' => 'Surname', |
||
30 | 'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress' => 'Email' |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @param FieldList $fields |
||
35 | */ |
||
36 | public function updateCMSFields(FieldList $fields) |
||
41 | } |
||
42 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.