Exemplo n.º 1
0
 function prepareInputForAdd($input)
 {
     if (isset($input['mail_server']) && !empty($input['mail_server'])) {
         $input["connect_string"] = constructMailServerConfig($input);
     }
     return $input;
 }
 function prepareInputForAdd($input)
 {
     global $LANG;
     if (isset($input["passwd"])) {
         if (empty($input["passwd"])) {
             unset($input["passwd"]);
         } else {
             $input["passwd"] = encrypt(stripslashes($input["passwd"]), GLPIKEY);
         }
     }
     if (isset($input['mail_server']) && !empty($input['mail_server'])) {
         $input["host"] = constructMailServerConfig($input);
     }
     if (!NotificationMail::isUserAddressValid($input['name'])) {
         addMessageAfterRedirect($LANG['mailing'][111] . ' : ' . $LANG['mailing'][110], false, ERROR);
     }
     return $input;
 }