69 $this->lang_variables_as_fallback = $a_status;
85 $this->u_password = $a_pwd;
108 $this->user =& $a_user;
130 $this->u_target = $a_target;
149 unset($this->u_password);
151 unset($this->target);
159 if (!is_array($this->amail[$a_lang]))
161 include_once(
'./Services/User/classes/class.ilObjUserFolder.php');
163 $amail[
"body"] = trim($amail[
"body"]);
164 $amail[
"subject"] = trim($amail[
"subject"]);
167 return $this->amail[$a_lang];
184 if (!
$user->getEmail())
192 if ($amail[
'body'] ==
'' || $amail[
'subject'] ==
'')
195 $lang = $ilSetting->get(
'language');
204 ($amail[
'body'] ==
'' || $amail[
'subject'] ==
''))
210 $mail_subject = $tmp_lang->txt(
'reg_mail_subject');
213 $mail_body = $tmp_lang->txt(
'reg_mail_body_salutation').
' '.
$user->getFullname().
",\n\n".
214 $tmp_lang->txt(
'reg_mail_body_text1').
"\n\n".
215 $tmp_lang->txt(
'reg_mail_body_text2').
"\n".
216 ILIAS_HTTP_PATH.
'/login.php?client_id='.CLIENT_ID.
"\n";
217 $mail_body .= $tmp_lang->txt(
'login').
': '.
$user->getLogin().
"\n";
218 $mail_body.= $tmp_lang->txt(
'passwd').
': '.$this->u_password.
"\n";
220 $mail_body .= $tmp_lang->txt(
'reg_mail_body_text3').
"\n\r";
221 $mail_body .=
$user->getProfileAsString($tmp_lang);
231 include_once
'Services/Mail/classes/class.ilMimeMail.php';
233 $mmail->autoCheck(
false);
234 $mmail->From($ilSetting->get(
'admin_email'));
235 $mmail->Subject($mail_subject);
236 $mmail->To(
$user->getEmail());
237 $mmail->Body($mail_body);
254 switch ($a_user->getGender())
256 case "f" : $gender_salut = $a_amail[
"sal_f"];
258 case "m" : $gender_salut = $a_amail[
"sal_m"];
260 default : $gender_salut = $a_amail[
"sal_g"];
262 $gender_salut = trim($gender_salut);
264 $a_string = str_replace(
"[MAIL_SALUTATION]", $gender_salut, $a_string);
265 $a_string = str_replace(
"[LOGIN]", $a_user->getLogin(), $a_string);
266 $a_string = str_replace(
"[FIRST_NAME]", $a_user->getFirstname(), $a_string);
267 $a_string = str_replace(
"[LAST_NAME]", $a_user->getLastname(), $a_string);
269 $a_string = str_replace(
"[EMAIL]", $a_user->getEmail(), $a_string);
271 $a_string = str_replace(
"[PASSWORD]", $this->
getUserPassword(), $a_string);
272 $a_string = str_replace(
"[ILIAS_URL]",
273 ILIAS_HTTP_PATH.
"/login.php?client_id=".CLIENT_ID, $a_string);
274 $a_string = str_replace(
"[CLIENT_NAME]", CLIENT_NAME, $a_string);
275 $a_string = str_replace(
"[ADMIN_MAIL]", $ilSetting->get(
"admin_email"),
281 $a_string = eregi_replace(
"\[".$ws.
"IF_PASSWORD".$ws.
"\].*\[\/".$ws.
"IF_PASSWORD".$ws.
"\]",
283 $a_string = eregi_replace(
"\[".$ws.
"IF_NO_PASSWORD".$ws.
"\](.*)\[\/".$ws.
"IF_NO_PASSWORD".$ws.
"\]",
288 $a_string = eregi_replace(
"\[".$ws.
"IF_NO_PASSWORD".$ws.
"\].*\[\/".$ws.
"IF_NO_PASSWORD".$ws.
"\]",
290 $a_string = eregi_replace(
"\[".$ws.
"IF_PASSWORD".$ws.
"\](.*)\[\/".$ws.
"IF_PASSWORD".$ws.
"\]",
296 if (
$_GET[
"target"] !=
"")
298 $tarr = explode(
"_",
$_GET[
"target"]);
299 if ($tree->isInTree($tarr[1]))
303 if (
$type == $tarr[0])
307 $a_string = str_replace(
"[TARGET]",
308 ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
"&target=".
$_GET[
"target"],
313 include_once(
"./Services/Language/classes/class.ilLanguage.php");
314 $a_string = str_replace(
"[TARGET_TYPE]",
326 $a_string = eregi_replace(
"\[".$ws.
"IF_TARGET".$ws.
"\].*\[\/".$ws.
"IF_TARGET".$ws.
"\]",
331 $a_string = eregi_replace(
"\[".$ws.
"IF_TARGET".$ws.
"\](.*)\[\/".$ws.
"IF_TARGET".$ws.
"\]",