constructMailServerConfig() static public method

static public constructMailServerConfig ( $input )
$input
コード例 #1
0
ファイル: authmail.class.php プロジェクト: btry/glpi
 function prepareInputForAdd($input)
 {
     if (isset($input['mail_server']) && !empty($input['mail_server'])) {
         $input["connect_string"] = Toolbox::constructMailServerConfig($input);
     }
     return $input;
 }
コード例 #2
0
 /**
  * @see CommonDBTM::prepareInputForAdd()
  **/
 function prepareInputForAdd($input)
 {
     if (isset($input["passwd"])) {
         if (empty($input["passwd"])) {
             unset($input["passwd"]);
         } else {
             $input["passwd"] = Toolbox::encrypt(stripslashes($input["passwd"]), GLPIKEY);
         }
     }
     if (isset($input['mail_server']) && !empty($input['mail_server'])) {
         $input["host"] = Toolbox::constructMailServerConfig($input);
     }
     if (!NotificationMail::isUserAddressValid($input['name'])) {
         Session::addMessageAfterRedirect(__('Invalid email address'), false, ERROR);
     }
     return $input;
 }