ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAccountRegistrationGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
23 {
24  protected $registration_settings; // [object]
25  protected $code_enabled; // [bool]
26  protected $code_was_used; // [bool]
28  protected $userObj;
29 
32 
37 
38  public function __construct()
39  {
40  global $DIC;
41 
42  $ilCtrl = $DIC->ctrl();
43  $tpl = $DIC['tpl'];
44  $lng = $DIC->language();
45 
46  $this->tpl = &$tpl;
47 
48  $this->ctrl = &$ilCtrl;
49  $this->ctrl->saveParameter($this, 'lang');
50 
51  $this->lng = &$lng;
52  $this->lng->loadLanguageModule('registration');
53 
54  $this->registration_settings = new ilRegistrationSettings();
55 
56  $this->code_enabled = ($this->registration_settings->registrationCodeRequired() ||
57  $this->registration_settings->getAllowCodes());
58 
59  $this->termsOfServiceEvaluation = $DIC['tos.document.evaluator'];
60  $this->recommended_content_manager = new ilRecommendedContentManager();
61  }
62 
63  public function executeCommand()
64  {
65  global $DIC;
66 
67  if ($this->registration_settings->getRegistrationType() == IL_REG_DISABLED) {
68  $ilErr = $DIC['ilErr'];
69  $ilErr->raiseError($this->lng->txt('reg_disabled'), $ilErr->FATAL);
70  }
71 
72  $cmd = $this->ctrl->getCmd();
73  switch ($cmd) {
74  case 'saveForm':
75  $tpl = $this->$cmd();
76  break;
77  default:
78  $tpl = $this->displayForm();
79  }
80 
81  $gtpl = $this->tpl;
82  $gtpl->setPermanentLink('usr', null, 'registration');
84  }
85 
89  public function displayForm()
90  {
91 
92  $tpl = ilStartUpGUI::initStartUpTemplate(array('tpl.usr_registration.html', 'Services/Registration'), true);
93  $tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('registration'));
94 
95  if (!$this->form) {
96  $this->__initForm();
97  }
98  $tpl->setVariable('FORM', $this->form->getHTML());
99  return $tpl;
100  }
101 
102  protected function __initForm()
103  {
104  global $DIC;
105 
106  $ilUser = $DIC->user();
107 
108  $ilUser->setLanguage($this->lng->getLangKey());
109  $ilUser->setId(ANONYMOUS_USER_ID);
110 
111  // needed for multi-text-fields (interests)
113 
114  $this->form = new ilPropertyFormGUI();
115  $this->form->setFormAction($this->ctrl->getFormAction($this));
116 
117 
118  // code handling
119 
120  if ($this->code_enabled) {
121  $field = new ilFormSectionHeaderGUI();
122  $field->setTitle($this->lng->txt('registration_codes_type_reg'));
123  $this->form->addItem($field);
124  $code = new ilTextInputGUI($this->lng->txt("registration_code"), "usr_registration_code");
125  $code->setSize(40);
126  $code->setMaxLength(ilRegistrationCode::CODE_LENGTH);
127  if ((bool) $this->registration_settings->registrationCodeRequired()) {
128  $code->setRequired(true);
129  $code->setInfo($this->lng->txt("registration_code_required_info"));
130  } else {
131  $code->setInfo($this->lng->txt("registration_code_optional_info"));
132  }
133  $this->form->addItem($code);
134  }
135 
136 
137  // user defined fields
138  $user_defined_data = $ilUser->getUserDefinedData();
139 
140  $user_defined_fields = ilUserDefinedFields::_getInstance();
141  $custom_fields = array();
142 
143  foreach ($user_defined_fields->getRegistrationDefinitions() as $field_id => $definition) {
144  $fprop = ilCustomUserFieldsHelper::getInstance()->getFormPropertyForDefinition(
145  $definition,
146  true,
147  $user_defined_data['f_' . $field_id]
148  );
149  if ($fprop instanceof ilFormPropertyGUI) {
150  $custom_fields['udf_' . $definition['field_id']] = $fprop;
151  }
152  }
153 
154  // standard fields
155  $up = new ilUserProfile();
156  $up->setMode(ilUserProfile::MODE_REGISTRATION);
157  $up->skipGroup("preferences");
158 
159  $up->setAjaxCallback(
160  $this->ctrl->getLinkTarget($this, 'doProfileAutoComplete', '', true)
161  );
162 
163  $this->lng->loadLanguageModule("user");
164 
165  // add fields to form
166  $up->addStandardFieldsToForm($this->form, null, $custom_fields);
167  unset($custom_fields);
168 
169 
170  // set language selection to current display language
171  $flang = $this->form->getItemByPostVar("usr_language");
172  if ($flang) {
173  $flang->setValue($this->lng->getLangKey());
174  }
175 
176  // add information to role selection (if not hidden)
177  if ($this->code_enabled) {
178  $role = $this->form->getItemByPostVar("usr_roles");
179  if ($role && $role->getType() == "select") {
180  $role->setInfo($this->lng->txt("registration_code_role_info"));
181  }
182  }
183 
184  // #11407
185  $domains = array();
186  foreach ($this->registration_settings->getAllowedDomains() as $item) {
187  if (trim($item)) {
188  $domains[] = $item;
189  }
190  }
191  if (sizeof($domains)) {
192  $mail_obj = $this->form->getItemByPostVar('usr_email');
193  $mail_obj->setInfo(sprintf(
194  $this->lng->txt("reg_email_domains"),
195  implode(", ", $domains)
196  ) . "<br />" .
197  ($this->code_enabled ? $this->lng->txt("reg_email_domains_code") : ""));
198  }
199 
200  // #14272
201  if ($this->registration_settings->getRegistrationType() == IL_REG_ACTIVATION) {
202  $mail_obj = $this->form->getItemByPostVar('usr_email');
203  if ($mail_obj) { // #16087
204  $mail_obj->setRequired(true);
205  }
206  }
207 
208  if (\ilTermsOfServiceHelper::isEnabled() && $this->termsOfServiceEvaluation->hasDocument()) {
209  $document = $this->termsOfServiceEvaluation->document();
210 
211  $field = new ilFormSectionHeaderGUI();
212  $field->setTitle($this->lng->txt('usr_agreement'));
213  $this->form->addItem($field);
214 
215  $field = new ilCustomInputGUI();
216  $field->setHTML('<div id="agreement">' . $document->content() . '</div>');
217  $this->form->addItem($field);
218 
219  $field = new ilCheckboxInputGUI($this->lng->txt('accept_usr_agreement'), 'accept_terms_of_service');
220  $field->setRequired(true);
221  $field->setValue(1);
222  $this->form->addItem($field);
223  }
224 
225 
226  if (ilCaptchaUtil::isActiveForRegistration()) {
227  $captcha = new ilCaptchaInputGUI($this->lng->txt("captcha_code"), 'captcha_code');
228  $captcha->setRequired(true);
229  $this->form->addItem($captcha);
230  }
231 
232  $this->form->addCommandButton("saveForm", $this->lng->txt("register"));
233  }
234 
235  public function saveForm()
236  {
237  global $DIC;
238 
239  $ilSetting = $DIC->settings();
240  $rbacreview = $DIC->rbac()->review();
241 
242  $this->__initForm();
243  $form_valid = $this->form->checkInput();
244 
245  // custom validation
246  $valid_code = $valid_role = false;
247 
248  // code
249  if ($this->code_enabled) {
250  $code = $this->form->getInput('usr_registration_code');
251  // could be optional
252  if (
253  $this->registration_settings->registrationCodeRequired() ||
254  strlen($code)
255  ) {
256  // code validation
258  $code_obj = $this->form->getItemByPostVar('usr_registration_code');
259  $code_obj->setAlert($this->lng->txt('registration_code_not_valid'));
260  $form_valid = false;
261  } else {
262  $valid_code = true;
263 
264  // get role from code, check if (still) valid
265  $role_id = (int) ilRegistrationCode::getCodeRole($code);
266  if ($role_id && $rbacreview->isGlobalRole($role_id)) {
267  $valid_role = $role_id;
268  }
269  }
270  }
271  }
272 
273  // valid codes override email domain check
274  if (!$valid_code) {
275  // validate email against restricted domains
276  $email = $this->form->getInput("usr_email");
277  if ($email) {
278  // #10366
279  $domains = array();
280  foreach ($this->registration_settings->getAllowedDomains() as $item) {
281  if (trim($item)) {
282  $domains[] = $item;
283  }
284  }
285  if (sizeof($domains)) {
286  $mail_valid = false;
287  foreach ($domains as $domain) {
288  $domain = str_replace("*", "~~~", $domain);
289  $domain = preg_quote($domain);
290  $domain = str_replace("~~~", ".+", $domain);
291  if (preg_match("/^" . $domain . "$/", $email, $hit)) {
292  $mail_valid = true;
293  break;
294  }
295  }
296  if (!$mail_valid) {
297  $mail_obj = $this->form->getItemByPostVar('usr_email');
298  $mail_obj->setAlert(sprintf(
299  $this->lng->txt("reg_email_domains"),
300  implode(", ", $domains)
301  ));
302  $form_valid = false;
303  }
304  }
305  }
306  }
307 
308  $error_lng_var = '';
309  if (
310  !$this->registration_settings->passwordGenerationEnabled() &&
311  !ilUtil::isPasswordValidForUserContext($this->form->getInput('usr_password'), $this->form->getInput('username'), $error_lng_var)
312  ) {
313  $passwd_obj = $this->form->getItemByPostVar('usr_password');
314  $passwd_obj->setAlert($this->lng->txt($error_lng_var));
315  $form_valid = false;
316  }
317 
318  $showGlobalTermsOfServieFailure = false;
319  if (\ilTermsOfServiceHelper::isEnabled() && !$this->form->getInput('accept_terms_of_service')) {
320  $agr_obj = $this->form->getItemByPostVar('accept_terms_of_service');
321  if ($agr_obj) {
322  $agr_obj->setAlert($this->lng->txt('force_accept_usr_agreement'));
323  $form_valid = false;
324  } else {
325  $showGlobalTermsOfServieFailure = true;
326  }
327  }
328 
329  // no need if role is attached to code
330  if (!$valid_role) {
331  // manual selection
332  if ($this->registration_settings->roleSelectionEnabled()) {
333  $selected_role = $this->form->getInput("usr_roles");
334  if ($selected_role && ilObjRole::_lookupAllowRegister($selected_role)) {
335  $valid_role = (int) $selected_role;
336  }
337  }
338  // assign by email
339  else {
340  $registration_role_assignments = new ilRegistrationRoleAssignments();
341  $valid_role = (int) $registration_role_assignments->getRoleByEmail($this->form->getInput("usr_email"));
342  }
343  }
344 
345  // no valid role could be determined
346  if (!$valid_role) {
347  ilUtil::sendInfo($this->lng->txt("registration_no_valid_role"));
348  $form_valid = false;
349  }
350 
351  // validate username
352  $login_obj = $this->form->getItemByPostVar('username');
353  $login = $this->form->getInput("username");
354  $captcha = $this->form->getItemByPostVar("captcha_code");
355  if (!ilUtil::isLogin($login)) {
356  $login_obj->setAlert($this->lng->txt("login_invalid"));
357  $form_valid = false;
358  }
359 
360  if ($form_valid) {
362  if (empty($captcha) || empty($captcha->getAlert())) {
363  $login_obj->setAlert($this->lng->txt("login_exists"));
364  }
365  $form_valid = false;
366  } elseif ((int) $ilSetting->get('allow_change_loginname') &&
367  (int) $ilSetting->get('reuse_of_loginnames') == 0 &&
369  if (empty($captcha) || empty($captcha->getAlert())) {
370  $login_obj->setAlert($this->lng->txt("login_exists"));
371  }
372  $form_valid = false;
373  }
374  }
375 
376  if (!$form_valid) {
377  ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
378  } elseif ($showGlobalTermsOfServieFailure) {
379  $this->lng->loadLanguageModule('tos');
380  \ilUtil::sendFailure(sprintf(
381  $this->lng->txt('tos_account_reg_not_possible'),
383  ));
384  } else {
385  $password = $this->__createUser($valid_role);
387  return $this->login();
388  }
389  $this->form->setValuesByPost();
390  return $this->displayForm();
391  }
392 
393  protected function __createUser($a_role)
394  {
399  global $DIC;
400 
401  $ilSetting = $DIC->settings();
402  $rbacadmin = $DIC->rbac()->admin();
403 
404 
405  // something went wrong with the form validation
406  if (!$a_role) {
407  global $DIC;
408 
409  $ilias = $DIC['ilias'];
410  $ilias->raiseError("Invalid role selection in registration" .
411  ", IP: " . $_SERVER["REMOTE_ADDR"], $ilias->error_obj->FATAL);
412  }
413 
414 
415  $this->userObj = new ilObjUser();
416 
417  $up = new ilUserProfile();
418  $up->setMode(ilUserProfile::MODE_REGISTRATION);
419 
420  $map = array();
421  $up->skipGroup("preferences");
422  $up->skipGroup("settings");
423  $up->skipField("password");
424  $up->skipField("birthday");
425  $up->skipField("upload");
426  foreach ($up->getStandardFields() as $k => $v) {
427  if ($v["method"]) {
428  $method = "set" . substr($v["method"], 3);
429  if (method_exists($this->userObj, $method)) {
430  if ($k != "username") {
431  $k = "usr_" . $k;
432  }
433  $field_obj = $this->form->getItemByPostVar($k);
434  if ($field_obj) {
435  $this->userObj->$method($this->form->getInput($k));
436  }
437  }
438  }
439  }
440 
441  $this->userObj->setFullName();
442 
443  $birthday_obj = $this->form->getItemByPostVar("usr_birthday");
444  if ($birthday_obj) {
445  $birthday = $this->form->getInput("usr_birthday");
446  $this->userObj->setBirthday($birthday);
447  }
448 
449  $this->userObj->setTitle($this->userObj->getFullname());
450  $this->userObj->setDescription($this->userObj->getEmail());
451 
452  if ($this->registration_settings->passwordGenerationEnabled()) {
454  $password = $password[0];
455  } else {
456  $password = $this->form->getInput("usr_password");
457  }
458  $this->userObj->setPasswd($password);
459 
460 
461  // Set user defined data
462  $user_defined_fields = &ilUserDefinedFields::_getInstance();
463  $defs = $user_defined_fields->getRegistrationDefinitions();
464  $udf = array();
465  foreach ($_POST as $k => $v) {
466  if (substr($k, 0, 4) == "udf_") {
467  $f = substr($k, 4);
468  $udf[$f] = $v;
469  }
470  }
471  $this->userObj->setUserDefinedData($udf);
472 
473  $this->userObj->setTimeLimitOwner(7);
474 
475 
476  $access_limit = null;
477 
478  $this->code_was_used = false;
479  if ($this->code_enabled) {
480  $code_local_roles = $code_has_access_limit = null;
481 
482  // #10853 - could be optional
483  $code = $this->form->getInput('usr_registration_code');
484  if ($code) {
485 
486  // set code to used
488  $this->code_was_used = true;
489 
490  // handle code attached local role(s) and access limitation
491  $code_data = ilRegistrationCode::getCodeData($code);
492  if ($code_data["role_local"]) {
493  // need user id before we can assign role(s)
494  $code_local_roles = explode(";", $code_data["role_local"]);
495  }
496  if ($code_data["alimit"]) {
497  // see below
498  $code_has_access_limit = true;
499 
500  switch ($code_data["alimit"]) {
501  case "absolute":
502  $abs = date_parse($code_data["alimitdt"]);
503  $access_limit = mktime(23, 59, 59, $abs['month'], $abs['day'], $abs['year']);
504  break;
505 
506  case "relative":
507  $rel = unserialize($code_data["alimitdt"]);
508  $access_limit = $rel["d"] * 86400 + $rel["m"] * 2592000 +
509  $rel["y"] * 31536000 + time();
510  break;
511  }
512  }
513  }
514  }
515 
516  // code access limitation will override any other access limitation setting
517  if (!($this->code_was_used && $code_has_access_limit) &&
518  $this->registration_settings->getAccessLimitation()) {
519  $access_limitations_obj = new ilRegistrationRoleAccessLimitations();
520  switch ($access_limitations_obj->getMode($a_role)) {
521  case 'absolute':
522  $access_limit = $access_limitations_obj->getAbsolute($a_role);
523  break;
524 
525  case 'relative':
526  $rel_d = (int) $access_limitations_obj->getRelative($a_role, 'd');
527  $rel_m = (int) $access_limitations_obj->getRelative($a_role, 'm');
528  $rel_y = (int) $access_limitations_obj->getRelative($a_role, 'y');
529  $access_limit = $rel_d * 86400 + $rel_m * 2592000 + $rel_y * 31536000 + time();
530  break;
531  }
532  }
533 
534  if ($access_limit) {
535  $this->userObj->setTimeLimitUnlimited(0);
536  $this->userObj->setTimeLimitUntil($access_limit);
537  } else {
538  $this->userObj->setTimeLimitUnlimited(1);
539  $this->userObj->setTimeLimitUntil(time());
540  }
541 
542  $this->userObj->setTimeLimitFrom(time());
543 
545 
546  $this->userObj->create();
547 
548 
549  if ($this->registration_settings->getRegistrationType() == IL_REG_DIRECT ||
550  $this->registration_settings->getRegistrationType() == IL_REG_CODES ||
552  $this->userObj->setActive(1, 0);
553  } elseif ($this->registration_settings->getRegistrationType() == IL_REG_ACTIVATION) {
554  $this->userObj->setActive(0, 0);
555  } else {
556  $this->userObj->setActive(0, 0);
557  }
558 
559  $this->userObj->updateOwner();
560 
561  // set a timestamp for last_password_change
562  // this ts is needed by ilSecuritySettings
563  $this->userObj->setLastPasswordChangeTS(time());
564 
565  $this->userObj->setIsSelfRegistered(true);
566 
567  //insert user data in table user_data
568  $this->userObj->saveAsNew();
569 
570  // setup user preferences
571  $this->userObj->setLanguage($this->form->getInput('usr_language'));
572 
573  $handleDocument = \ilTermsOfServiceHelper::isEnabled() && $this->termsOfServiceEvaluation->hasDocument();
574  if ($handleDocument) {
575  $helper = new \ilTermsOfServiceHelper();
576 
577  $helper->trackAcceptance($this->userObj, $this->termsOfServiceEvaluation->document());
578  }
579 
580  $hits_per_page = $ilSetting->get("hits_per_page");
581  if ($hits_per_page < 10) {
582  $hits_per_page = 10;
583  }
584  $this->userObj->setPref("hits_per_page", $hits_per_page);
585  if (strlen($_GET['target']) > 0) {
586  $this->userObj->setPref('reg_target', ilUtil::stripSlashes($_GET['target']));
587  }
588  /*$show_online = $ilSetting->get("show_users_online");
589  if ($show_online == "")
590  {
591  $show_online = "y";
592  }
593  $this->userObj->setPref("show_users_online", $show_online);*/
594  $this->userObj->setPref('bs_allow_to_contact_me', $ilSetting->get('bs_allow_to_contact_me', 'n'));
595  $this->userObj->setPref('chat_osc_accept_msg', $ilSetting->get('chat_osc_accept_msg', 'n'));
596  $this->userObj->writePrefs();
597 
598 
599  $rbacadmin->assignUser((int) $a_role, $this->userObj->getId());
600 
601  // local roles from code
602  if ($this->code_was_used && is_array($code_local_roles)) {
603  foreach (array_unique($code_local_roles) as $local_role_obj_id) {
604  // is given role (still) valid?
605  if (ilObject::_lookupType($local_role_obj_id) == "role") {
606  $rbacadmin->assignUser($local_role_obj_id, $this->userObj->getId());
607 
608  // patch to remove for 45 due to mantis 21953
609  $role_obj = $GLOBALS['DIC']['rbacreview']->getObjectOfRole($local_role_obj_id);
610  switch (ilObject::_lookupType($role_obj)) {
611  case 'crs':
612  case 'grp':
613  $role_refs = ilObject::_getAllReferences($role_obj);
614  $role_ref = end($role_refs);
615  // deactivated for now, see discussion at
616  // https://docu.ilias.de/goto_docu_wiki_wpage_5620_1357.html
617  // $this->recommended_content_manager->addObjectRecommendation($this->userObj->getId(), $role_ref);
618  break;
619  }
620  }
621  }
622  }
623 
624  return $password;
625  }
626 
627  protected function __distributeMails($password)
628  {
629 
630  // Always send mail to approvers
631  if ($this->registration_settings->getRegistrationType() == IL_REG_APPROVE && !$this->code_was_used) {
632  $mail = new ilRegistrationMailNotification();
634  $mail->setRecipients($this->registration_settings->getApproveRecipients());
635  $mail->setAdditionalInformation(array('usr' => $this->userObj));
636  $mail->send();
637  } else {
638  $mail = new ilRegistrationMailNotification();
640  $mail->setRecipients($this->registration_settings->getApproveRecipients());
641  $mail->setAdditionalInformation(array('usr' => $this->userObj));
642  $mail->send();
643  }
644 
645  // Send mail to new user
646  // Registration with confirmation link ist enabled
647  if ($this->registration_settings->getRegistrationType() == IL_REG_ACTIVATION && !$this->code_was_used) {
648 
651  $mail->setRecipients(array($this->userObj));
652  $mail->setAdditionalInformation(
653  array(
654  'usr' => $this->userObj,
655  'hash_lifetime' => $this->registration_settings->getRegistrationHashLifetime()
656  )
657  );
658  $mail->send();
659  } else {
660  $accountMail = new ilAccountRegistrationMail(
661  $this->registration_settings,
662  $this->lng,
664  );
665  $accountMail->withDirectRegistrationMode()->send($this->userObj, $password, $this->code_was_used);
666  }
667  }
668 
669  public function login()
670  {
671  global $DIC;
672  $f = $DIC->ui()->factory();
673  $renderer = $DIC->ui()->renderer();
674 
675  $tpl = ilStartUpGUI::initStartUpTemplate(array('tpl.usr_registered.html', 'Services/Registration'), false);
676  $this->tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('registration'));
677 
678  $tpl->setVariable("TXT_WELCOME", $this->lng->txt("welcome") . ", " . $this->userObj->getTitle() . "!");
679  if (
680  (
681  $this->registration_settings->getRegistrationType() == IL_REG_DIRECT ||
682  $this->registration_settings->getRegistrationType() == IL_REG_CODES ||
684  ) &&
685  !$this->registration_settings->passwordGenerationEnabled()
686  ) {
687  $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_registered'));
688 
689  $login_link = $renderer->render($f->link()->standard($this->lng->txt('login_to_ilias'), './login.php?cmd=force_login&lang=' . $this->userObj->getLanguage()));
690  $tpl->setVariable('LOGIN_LINK', $login_link);
691  } elseif ($this->registration_settings->getRegistrationType() == IL_REG_APPROVE) {
692  $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_submitted'));
693  } elseif ($this->registration_settings->getRegistrationType() == IL_REG_ACTIVATION) {
694  $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('reg_confirmation_link_successful'));
695  } else {
696  $tpl->setVariable('TXT_REGISTERED', $this->lng->txt('txt_registered_passw_gen'));
697  }
698  return $tpl;
699  }
700 
706  protected function showLogin()
707  {
708  global $DIC;
712  $auth_session = $DIC['ilAuthSession'];
713  $auth_session->setAuthenticated(
714  true,
715  $DIC->user()->getId()
716  );
718  return ilInitialisation::redirectToStartingPage();
719  }
720 
721  protected function doProfileAutoComplete()
722  {
723  $field_id = (string) $_REQUEST["f"];
724  $term = (string) $_REQUEST["term"];
725 
727  if (sizeof($result)) {
729  }
730 
731  exit();
732  }
733 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$login
Definition: cron.php:13
exit
Definition: login.php:29
Class for mime mail registration notifications.
static _getInstance()
Get instance.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
$result
This class represents a property form user interface.
Class ilAccountRegistrationGUI.
This class represents a captcha input in a property form.
$_GET["client_id"]
static isPasswordValidForUserContext($clear_text_password, $user, &$error_language_variable=null)
static getInstance()
Get instance.
This class represents a section header in a property form.
static getAutocompleteResult($a_field_id, $a_term)
Class ilUserProfile.
This class represents a checkbox property in a property form.
static generatePasswords($a_number)
Generate a number of passwords.
static printToGlobalTemplate($tpl)
static _getAllReferences($a_id)
get all reference ids of object
$ilErr
Definition: raiseError.php:18
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _loginExists($a_login, $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
static encode($mixed, $suppress_native=false)
static getMailsToAddress()
Get mailto: emails.
Class ilAccountRegistrationMail.
static isValidRegistrationCode($a_code)
Check if given code is a valid registration code.
$lng
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
const IL_REG_ACTIVATION
$ilUser
Definition: imgupload.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static _lookupType($a_id, $a_reference=false)
lookup object type
if($orgName !==null) if($spconfig->hasValue('contacts')) $email
Definition: metadata.php:285
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$password
Definition: cron.php:14
Class ilObjAuthSettingsGUI.
This class represents a custom property in a property form.
static isLogin($a_login)
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
This class represents a property in a property form.
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
static getLogger($a_component_id)
Get component logger.
static initUserAccount()
Init user with current account id.
static _lookupAllowRegister($a_role_id)
check whether role is allowed in user registration or not
$_POST["username"]
Recommended content manager (business logic)
setRequired($a_required)
Set Required.
static _doesLoginnameExistInHistory($a_login)
Checks wether the passed loginname already exists in history.