33 define(
'IL_REG_MISSING_DOMAIN', 1);
34 define(
'IL_REG_MISSING_ROLE', 2);
51 global $ilObjDataCache;
53 foreach ($this->assignments as $assignment) {
54 if (!$assignment[
'domain'] or !$assignment[
'role']) {
57 if (stristr($a_email, $assignment[
'domain'])) {
59 if (!$ilObjDataCache->lookupType($assignment[
'role'])) {
62 return $assignment[
'role'];
71 return $this->assignments ? $this->assignments :
array();
76 $this->assignments[$a_id][
'domain'] = $a_domain;
80 $this->assignments[$a_id][
'role'] = $a_role;
89 $this->default_role = $a_role_id;
92 public function delete($a_id)
96 $query =
"DELETE FROM reg_er_assignments " .
97 "WHERE assignment_id = " . $ilDB->quote($a_id,
'integer');
107 $next_id = $ilDB->nextId(
'reg_er_assignments');
108 $query =
"INSERT INTO reg_er_assignments (assignment_id,domain,role) " .
110 $ilDB->quote($next_id,
'integer') .
', ' .
111 $ilDB->quote(
'',
'text') .
", " .
112 $ilDB->quote(0,
'integer') .
121 global $ilias,
$ilDB;
126 foreach ($this->assignments as $assignment) {
127 $query =
"UPDATE reg_er_assignments " .
128 "SET domain = " . $ilDB->quote($assignment[
'domain'],
'text') .
", " .
129 "role = " . $ilDB->quote($assignment[
'role'],
'integer') .
" " .
130 "WHERE assignment_id = " . $ilDB->quote($assignment[
'id'],
'integer');
138 foreach ($this->assignments as $assignment) {
139 if (!strlen($assignment[
'domain'])) {
142 if (!$assignment[
'role']) {
158 global $ilias,
$ilDB;
160 $query =
"SELECT * FROM reg_er_assignments ";
163 $this->assignments =
array();
165 $this->assignments[
$row->assignment_id][
'id'] =
$row->assignment_id;
166 $this->assignments[
$row->assignment_id][
'role'] =
$row->role;
167 $this->assignments[
$row->assignment_id][
'domain'] =
$row->domain;
170 $this->default_role = $ilias->getSetting(
'reg_default_role');
setDomain($a_id, $a_domain)
const IL_REG_MISSING_ROLE
setDefaultRole($a_role_id)
foreach($_POST as $key=> $value) $res
const IL_REG_MISSING_DOMAIN
Class class.ilregistrationEmailRoleAssignments.
Create styles array
The data for the language used.