Example #1
0
      if ($history[0]['function'] == 'detail') {
         $back_hop = 1;
      } else {
         $back_hop = 0;
      }
      $mail_obj->setBackLink( $environment->getCurrentContextID(),
                              $history[$back_hop]['module'],
                              $history[$back_hop]['function'],
                              '');
   }
   if ($_GET['mode']=='not_public') {
      $item->setWorldPublic(0);

      // MAIL TO THE MODIFICATOR
      include_once('classes/cs_mail_obj.php');
      $mail_obj = new cs_mail_obj();

      //SENDER
      $sender[$current_user->getFullName()] = $current_user->getEmail();
      $mail_obj->setSender($sender);

      //RECEIVER
      $receiver_item = $item->getModificatorItem();
      $receiver[$receiver_item->getFullName()] = $receiver_item->getEmail();
      $mail_obj->addReceivers($receiver);

      //HEADLINE
      $mail_obj->setMailFormHeadLine($translator->getMessage('ADMIN_MAIL_ARCHIVE_SET_NOT_WOLRDPUBLIC_TITLE',$item->getTitle()));

      //SUBJECT AND BODY
      $user_language = $receiver_item->getLanguage();
Example #2
0
                              '_'.$environment->getCurrentModule().
                              '_selected_ids');
            redirect($environment->getCurrentContextID(), 'mail', 'process', '');
      }
      elseif  ((isset($_POST['index_view_action']) and ($_POST['index_view_action'] == '2')) or $material_mode =='not_public') {
            $action = 'COMMON_MATERIAL_NOT_PUBLISH';
            $material_manager = $environment->getMaterialManager();
            $reader_manager = $environment->getReaderManager();
            $first = true;
            foreach ($selected_ids as $id) {
               $item = $material_manager->getItem($id);
               $item->setWorldPublic(0);

               // MAIL TO THE MODIFICATOR
               include_once('classes/cs_mail_obj.php');
               $mail_obj = new cs_mail_obj();

               //SENDER
               $sender[$current_user->getFullName()] = $current_user->getEmail();
               $mail_obj->setSender($sender);

               //RECEIVER
               $receiver_item = $item->getModificatorItem();
               $receiver[$receiver_item->getFullName()] = $receiver_item->getEmail();
               $mail_obj->addReceivers($receiver);

               //HEADLINE
               $mail_obj->setMailFormHeadLine($translator->getMessage('ADMIN_MAIL_ARCHIVE_SET_NOT_WOLRDPUBLIC_TITLE',$item->getTitle()));

               //SUBJECT AND BODY
               $user_language = $receiver_item->getLanguage();
Example #3
0
            if (empty($error_string)) {
               $auth_manager = $authentication->getAuthManager($user->getAuthSource());
               $auth_manager->changePassword($_POST['user_id'],$_POST['password']);
               // set new expire date
               $portal_manager = $environment->getPortalManager();
               $portal_item = $portal_manager->getItem($user->getContextID());
               $user->setPasswordExpireDate($portal_item->getPasswordExpiration());
               $user->save();
               unset($portal_manager);
               $error_number = $auth_manager->getErrorNumber();
               if (empty($error_number)) {
                  $params = array();
                  $params['iid'] = $iid;

                  include_once('classes/cs_mail_obj.php');
                  $mail_obj = new cs_mail_obj();
                  $mail_obj->setMailFormHeadLine($translator->getMessage('USER_PASSWORD_CHANGE_HEADLINE'));

                  $mail_subject  = $translator->getMessage('MAIL_SUBJECT_USER_PASSWORD_CHANGE',$context_item->getTitle());
                  $mail_body  = $translator->getEmailMessage('MAIL_BODY_HELLO',$user->getFullname());
                  $mail_body .= LF.LF;
                  $mail_body .= $translator->getEmailMessage('MAIL_BODY_USER_PASSWORD_CHANGE',$user->getUserID(),$context_item->getTitle(),$_POST['password']);
                  $mail_body .= LF.LF;
                  $mail_body .= $translator->getEmailMessage('MAIL_BODY_CIAO',$current_user->getFullname(),$context_item->getTitle());

                  $url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?cid='.$environment->getCurrentContextID();
                  $mail_body .= LF.LF.$url;

                  $mail_obj->setMailFormHints($translator->getMessage('USER_MAIL_ADMIN_DESC'));
                  $mail_obj->setSubject($mail_subject);
                  $mail_obj->setContent($mail_body);
Example #4
0
         if ( $environment->inProjectRoom() or $environment->inCommunityRoom()) {
            $language = $context_item->getLanguage();
          if ($language == 'user') {
               $language = $user->getLanguage();
             if ($language == 'browser') {
               $lanugage = $environment->getSelectedLanguage();
             }
          }
         } else {
            $language = $user->getLanguage();
          if ($language == 'browser') {
            $lanugage = $environment->getSelectedLanguage();
          }
         }
         include_once('classes/cs_mail_obj.php');
         $mail_obj = new cs_mail_obj();
         $mail_obj->setMailFormHeadLine($translator->getMessage('ADMIN_USER_FORM_TITLE',$user->getFullname(),$translator->getMessage('COMMON_STEP_END')));

         // change language for user
         $save_language = $translator->getSelectedLanguage();
         $translator->setSelectedLanguage($user->getLanguage());
         
         // Datenschutz
         if($environment->getCurrentPortalItem()->getHideAccountname()){
         	$userid = $translator->getMessage('MAIL_ONLY_VISIBLE_FOR',$user->getFullName());
         	$session->setValue('status', $status);
         	$session->setValue('userAccount',$user->getUserID());
         } else {
         	$userid = $user->getUserID();
         }