22 $this->eru_id = $a_eru_id;
35 $query =
'SELECT eru_id FROM ecs_remote_user '.
36 'WHERE usr_id = '.$ilDB->quote($a_usr_id,
'integer');
40 return new self(
$row->eru_id);
52 $query =
'SELECT eru_id FROM ecs_remote_user '.
53 'WHERE sid = '.$ilDB->quote($this->
getServerId(),
'integer').
' '.
54 'AND mid = '.$ilDB->quote($this->
getMid(),
'integer').
' '.
55 'AND usr_id = '.$ilDB->quote($this->
getUserId(),
'integer');
59 return (
bool)
$row->eru_id;
93 $this->usr_id = $a_usr_id;
103 $this->remote_usr_id = $a_remote_id;
117 $query =
'UPDATE ecs_remote_user SET '.
118 'sid = '.$GLOBALS[
'ilDB']->quote($this->
getServerId(),
'integer').
', '.
119 'mid = '.$GLOBALS[
'ilDB']->quote($this->
getMid(),
'integer').
', '.
120 'usr_id = '.$GLOBALS[
'ilDB']->quote($this->
getUserId(),
'text').
', '.
121 'remote_usr_id = '.$GLOBALS[
'ilDB']->quote($this->
getRemoteUserId(),
'text').
' '.
122 'WHERE eru_id = '.$GLOBALS[
'ilDB']->quote($this->
getId());
133 $next_id =
$GLOBALS[
'ilDB']->nextId(
'ecs_remote_user');
134 $query =
'INSERT INTO ecs_remote_user (eru_id, sid, mid, usr_id, remote_usr_id) '.
136 $GLOBALS[
'ilDB']->quote($next_id).
', '.
156 $query =
'SELECT * FROM ecs_remote_user '.
157 'WHERE eru_id = '.$GLOBALS[
'ilDB']->quote($this->
getId(),
'integer');
setRemoteUserId($a_remote_id)
Storage of ecs remote user.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
update()
Update remote user entry.
exists()
Check if entry exists for user.
static factory($a_usr_id)
Get instance for usr_id.
create()
Create nerw remote user entry.
__construct($a_eru_id=0)
Constructor.