public static function replaceBillingMailPlaceholders($a_message, $a_user_id)
 {
     global $lng;
     $user = new ilObjUser($a_user_id);
     // determine salutation
     switch ($user->getGender()) {
         case 'f':
             $gender_salut = $lng->txt('salutation_f');
             break;
         case 'm':
             $gender_salut = $lng->txt('salutation_m');
             break;
     }
     $a_message = str_replace('[MAIL_SALUTATION]', $gender_salut, $a_message);
     $a_message = str_replace('[LOGIN]', $user->getLogin(), $a_message);
     $a_message = str_replace('[FIRST_NAME]', $user->getFirstname(), $a_message);
     $a_message = str_replace('[LAST_NAME]', $user->getLastname(), $a_message);
     $a_message = str_replace('[ILIAS_URL]', ILIAS_HTTP_PATH . '/login.php?client_id=' . CLIENT_ID, $a_message);
     $a_message = str_replace('[CLIENT_NAME]', CLIENT_NAME, $a_message);
     include_once './Services/Payment/classes/class.ilShopLinkBuilder.php';
     $shopLB = new ilShopLinkBuilder();
     $bought_objects_url = $shopLB->buildLink('ilShopBoughtObjectsGUI');
     $shop_url = $shopLB->buildLink('ilShopGUI');
     $a_message = str_replace('[SHOP_BOUGHT_OBJECTS_URL]', $bought_objects_url, $a_message);
     $a_message = str_replace('[SHOP_URL]', $shop_url, $a_message);
     unset($user);
     return $a_message;
 }
 /**
  * @param string $password
  */
 public function login($password)
 {
     /**
      * @var $lng ilLanguage
      */
     global $lng;
     ilStartUpGUI::initStartUpTemplate(array('tpl.usr_registered.html', 'Services/Registration'), true);
     $this->tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('registration'));
     $this->tpl->setVariable("TXT_WELCOME", $lng->txt("welcome") . ", " . $this->userObj->getTitle() . "!");
     if (($this->registration_settings->getRegistrationType() == IL_REG_DIRECT || $this->registration_settings->getRegistrationType() == IL_REG_CODES || $this->code_was_used) && !$this->registration_settings->passwordGenerationEnabled()) {
         $this->tpl->setCurrentBlock('activation');
         $this->tpl->setVariable('TXT_REGISTERED', $lng->txt('txt_registered'));
         $this->tpl->setVariable('FORMACTION', 'login.php?cmd=post&target=' . ilUtil::stripSlashes($_GET['target']));
         if (ilSession::get('forceShoppingCartRedirect')) {
             $this->tpl->setVariable('FORMACTION', './login.php?forceShoppingCartRedirect=1');
         }
         $this->tpl->setVariable('TARGET', 'target="_parent"');
         $this->tpl->setVariable('TXT_LOGIN', $lng->txt('login_to_ilias'));
         $this->tpl->setVariable('USERNAME', $this->userObj->getLogin());
         $this->tpl->setVariable('PASSWORD', $password);
         $this->tpl->parseCurrentBlock();
     } else {
         if ($this->registration_settings->getRegistrationType() == IL_REG_APPROVE) {
             $this->tpl->setVariable('TXT_REGISTERED', $lng->txt('txt_submitted'));
             if (IS_PAYMENT_ENABLED == true) {
                 if (ilSession::get('forceShoppingCartRedirect')) {
                     $this->tpl->setCurrentBlock('activation');
                     include_once 'Services/Payment/classes/class.ilShopLinkBuilder.php';
                     $shop_link = new ilShopLinkBuilder();
                     $this->tpl->setVariable('FORMACTION', $shop_link->buildLink('ilshopshoppingcartgui', '_forceShoppingCartRedirect_user='******'TARGET', 'target=\'_parent\'');
                     $this->lng->loadLanguageModule('payment');
                     $this->tpl->setVariable('TXT_LOGIN', $lng->txt('pay_goto_shopping_cart'));
                     $this->tpl->parseCurrentBlock();
                     $this->lng->loadLanguageModule('registration');
                 }
             }
         } else {
             if ($this->registration_settings->getRegistrationType() == IL_REG_ACTIVATION) {
                 $login_url = './login.php?cmd=force_login&lang=' . $this->userObj->getLanguage();
                 $this->tpl->setVariable('TXT_REGISTERED', sprintf($lng->txt('reg_confirmation_link_successful'), $login_url));
                 $this->tpl->setVariable('REDIRECT_URL', $login_url);
             } else {
                 $this->tpl->setVariable('TXT_REGISTERED', $lng->txt('txt_registered_passw_gen'));
             }
         }
     }
 }