1 | <?php |
||
11 | class RemoteUser extends BaseRemoteUser |
||
12 | { |
||
13 | protected $emailField; |
||
14 | |||
15 | /** |
||
16 | * @param array $authUserResult (nested array) |
||
17 | * @param string $emailField the name of the ldap attribute which holds the user email address |
||
18 | * @param string $login |
||
19 | * @param string $password |
||
20 | * |
||
21 | * @todo decide what to store of $AuthUserResult, so that it can be serialized without taking up too much space |
||
22 | * (otoh maybe this never gets serialized, and only the eZ-mvc-user does? |
||
23 | * Note that the list of attributes gotten from ladp is decided by settings for the client class... |
||
24 | * @todo store the password salted and encrypted in memory instead of plaintext |
||
25 | */ |
||
26 | public function __construct($authUserResult, $emailField, $login, $password='') |
||
33 | |||
34 | /** |
||
35 | * SF roles. Important: not to have this empty, otherwise SF will think this user is not an authenticated one |
||
36 | * @return array |
||
37 | */ |
||
38 | public function getRoles() |
||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getEmail() |
||
53 | |||
54 | /** |
||
55 | * Add typehint :-) |
||
56 | * @return array |
||
57 | */ |
||
58 | public function getProfile() |
||
62 | |||
63 | /** |
||
64 | * Transforms the data received from an LDAP query into a more 'normal' php array by removing redundant stuff. |
||
65 | * NB: assumes a well-formed array |
||
66 | * |
||
67 | * @param array $data |
||
68 | * @return array |
||
69 | * |
||
70 | * @todo return a stdclass object instead ? |
||
71 | */ |
||
72 | protected function ldap2array($data) { |
||
93 | } |
||
94 |