示例#1
0
     $new_user_prefs['DOB_BLANK_FIELDS'] = $new_user_prefs['DOB_YEAR'] == 0 || $new_user_prefs['DOB_MONTH'] == 0 || $new_user_prefs['DOB_DAY'] == 0 ? true : false;
 } else {
     $error_msg_array[] = gettext("Date of birth is required or is invalid");
     $valid = false;
 }
 if (forum_get_setting('text_captcha_enabled', 'Y')) {
     if (isset($_POST['public_key']) && strlen(trim($_POST['public_key'])) > 0) {
         $public_key = trim($_POST['public_key']);
         if (isset($_POST['private_key']) && strlen(trim($_POST['private_key'])) > 0) {
             $private_key = trim($_POST['private_key']);
         } else {
             $error_msg_array[] = gettext("A confirmation code is required.");
             $valid = false;
         }
         if ($valid) {
             $text_captcha->set_public_key($public_key);
             if (!$text_captcha->verify_keys($private_key)) {
                 $error_msg_array[] = gettext("Text-captcha verification code was incorrect. Please re-enter it.");
                 $valid = false;
             }
         }
     }
 }
 if ($valid) {
     if ($password != $check_password) {
         $error_msg_array[] = gettext("Passwords do not match");
         $valid = false;
     }
     if (mb_strtolower($logon) == mb_strtolower($password)) {
         $error_msg_array[] = gettext("Username and password must be different");
         $valid = false;