ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilECSUser Class Reference

Stores relevant user data. More...

+ Collaboration diagram for ilECSUser:

Public Member Functions

 __construct ($a_data)
 Constructor. More...
 
 getLogin ()
 get login More...
 
 getFirstname ()
 get firstname More...
 
 getLastname ()
 getLastname More...
 
 getEmail ()
 get email More...
 
 getInstitution ()
 get institution More...
 
 getImportId ()
 get Email More...
 
 loadFromObject ()
 load from object More...
 
 loadFromJSON ()
 load from json More...
 
 loadFromGET ()
 load user data from GET parameters More...
 
 toJSON ()
 @access public More...
 
 toGET ()
 get GET parameter string More...
 
 toREALM ()
 Concatenate all attributes to one string. More...
 

Data Fields

 $login
 
 $email
 
 $firstname
 
 $lastname
 
 $institution
 
 $uid_hash
 

Protected Attributes

 $source
 

Detailed Description

Stores relevant user data.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls

Definition at line 35 of file class.ilECSUser.php.

Constructor & Destructor Documentation

◆ __construct()

ilECSUser::__construct (   $a_data)

Constructor.

Parameters
mixedilObjUser or encoded json string @access public

Definition at line 52 of file class.ilECSUser.php.

53 {
54 $this->source = $a_data;
55 if (is_object($a_data)) {
56 $this->loadFromObject();
57 } elseif (is_array($a_data)) {
58 $this->loadFromGET();
59 } else {
60 $this->loadFromJSON();
61 }
62 }
loadFromObject()
load from object
loadFromGET()
load user data from GET parameters
loadFromJSON()
load from json

References loadFromGET(), loadFromJSON(), and loadFromObject().

+ Here is the call graph for this function:

Member Function Documentation

◆ getEmail()

ilECSUser::getEmail ( )

get email

@access public

Definition at line 101 of file class.ilECSUser.php.

102 {
103 return $this->email;
104 }

References $email.

Referenced by ilAuthContainerECS\createUser(), ilAuthProviderECS\createUser(), ilAuthContainerECS\updateUser(), and ilAuthProviderECS\updateUser().

+ Here is the caller graph for this function:

◆ getFirstname()

ilECSUser::getFirstname ( )

get firstname

@access public

Definition at line 81 of file class.ilECSUser.php.

82 {
83 return $this->firstname;
84 }

References $firstname.

Referenced by ilAuthContainerECS\createUser(), ilAuthProviderECS\createUser(), ilAuthContainerECS\updateUser(), and ilAuthProviderECS\updateUser().

+ Here is the caller graph for this function:

◆ getImportId()

ilECSUser::getImportId ( )

get Email

@access public

Definition at line 122 of file class.ilECSUser.php.

123 {
124 return $this->uid_hash;
125 }

References $uid_hash.

Referenced by ilAuthContainerECS\createUser(), ilAuthProviderECS\createUser(), ilAuthContainerECS\updateUser(), and ilAuthProviderECS\updateUser().

+ Here is the caller graph for this function:

◆ getInstitution()

ilECSUser::getInstitution ( )

get institution

@access public

Definition at line 111 of file class.ilECSUser.php.

112 {
113 return $this->institution;
114 }

References $institution.

Referenced by ilAuthContainerECS\createUser(), ilAuthProviderECS\createUser(), ilAuthContainerECS\updateUser(), and ilAuthProviderECS\updateUser().

+ Here is the caller graph for this function:

◆ getLastname()

ilECSUser::getLastname ( )

getLastname

@access public

Definition at line 91 of file class.ilECSUser.php.

92 {
93 return $this->lastname;
94 }

References $lastname.

Referenced by ilAuthContainerECS\createUser(), ilAuthProviderECS\createUser(), ilAuthContainerECS\updateUser(), and ilAuthProviderECS\updateUser().

+ Here is the caller graph for this function:

◆ getLogin()

ilECSUser::getLogin ( )

get login

@access public

Definition at line 70 of file class.ilECSUser.php.

71 {
72 return $this->login;
73 }

References $login.

Referenced by ilAuthContainerECS\createUser(), and ilAuthProviderECS\createUser().

+ Here is the caller graph for this function:

◆ loadFromGET()

ilECSUser::loadFromGET ( )

load user data from GET parameters

@access public

Definition at line 171 of file class.ilECSUser.php.

172 {
173 $this->login = ilUtil::stripSlashes(urldecode($_GET['ecs_login']));
174 $this->firstname = ilUtil::stripSlashes(urldecode($_GET['ecs_firstname']));
175 $this->lastname = ilUtil::stripSlashes(urldecode($_GET['ecs_lastname']));
176 $this->email = ilUtil::stripSlashes(urldecode($_GET['ecs_email']));
177 $this->institution = ilUtil::stripSlashes(urldecode($_GET['ecs_institution']));
178
179 if ($_GET['ecs_uid_hash']) {
180 $this->uid_hash = ilUtil::stripSlashes(urldecode($_GET['ecs_uid_hash']));
181 } elseif ($_GET['ecs_uid']) {
182 $this->uid_hash = ilUtil::stripSlashes(urldecode($_GET['ecs_uid']));
183 }
184 }
$_GET["client_id"]
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_GET, and ilUtil\stripSlashes().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadFromJSON()

ilECSUser::loadFromJSON ( )

load from json

@access public

Definition at line 152 of file class.ilECSUser.php.

153 {
154 $this->source = json_decode(urldecode($this->source));
155
156 $this->login = $this->source->login();
157 $this->firstname = $this->source->firstname();
158 $this->lastname = $this->source->lastname();
159 $this->email = $this->source->email();
160 $this->institution = $this->source->institution();
161
162 $this->uid_hash = $this->source->uid_hash;
163 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ loadFromObject()

ilECSUser::loadFromObject ( )

load from object

@access public

Definition at line 133 of file class.ilECSUser.php.

134 {
135 global $ilSetting;
136
137 $this->login = $this->source->getLogin();
138 $this->firstname = $this->source->getFirstname();
139 $this->lastname = $this->source->getLastname();
140 $this->email = $this->source->getEmail();
141 $this->institution = $this->source->getInstitution();
142
143 $this->uid_hash = 'il_' . $ilSetting->get('inst_id', 0) . '_usr_' . $this->source->getId();
144 }
global $ilSetting
Definition: privfeed.php:17

References $ilSetting.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ toGET()

ilECSUser::toGET ( )

get GET parameter string

@access public

Definition at line 204 of file class.ilECSUser.php.

205 {
206 return '&ecs_login=' . urlencode((string) $this->login) .
207 '&ecs_firstname=' . urlencode((string) $this->firstname) .
208 '&ecs_lastname=' . urlencode((string) $this->lastname) .
209 '&ecs_email=' . urlencode((string) $this->email) .
210 '&ecs_institution=' . urlencode((string) $this->institution) .
211 '&ecs_uid_hash=' . urlencode((string) $this->uid_hash);
212 '&ecs_uid=' . urlencode((string) $this->uid_hash);
213 }

◆ toJSON()

ilECSUser::toJSON ( )

@access public

Parameters

Definition at line 193 of file class.ilECSUser.php.

194 {
195 return urlencode(json_encode($this));
196 }

◆ toREALM()

ilECSUser::toREALM ( )

Concatenate all attributes to one string.

Returns
string

Definition at line 219 of file class.ilECSUser.php.

220 {
221 return
222 (string) $this->login . '' .
223 (string) $this->firstname . '' .
224 (string) $this->lastname . '' .
225 (string) $this->email . '' .
226 (string) $this->institution . '' .
227 (string) $this->uid_hash;
228 }

Field Documentation

◆ $email

ilECSUser::$email

Definition at line 40 of file class.ilECSUser.php.

Referenced by getEmail().

◆ $firstname

ilECSUser::$firstname

Definition at line 41 of file class.ilECSUser.php.

Referenced by getFirstname().

◆ $institution

ilECSUser::$institution

Definition at line 43 of file class.ilECSUser.php.

Referenced by getInstitution().

◆ $lastname

ilECSUser::$lastname

Definition at line 42 of file class.ilECSUser.php.

Referenced by getLastname().

◆ $login

ilECSUser::$login

Definition at line 39 of file class.ilECSUser.php.

Referenced by getLogin().

◆ $source

ilECSUser::$source
protected

Definition at line 37 of file class.ilECSUser.php.

◆ $uid_hash

ilECSUser::$uid_hash

Definition at line 44 of file class.ilECSUser.php.

Referenced by getImportId().


The documentation for this class was generated from the following file: