Ejemplo n.º 1
0
     $user_agree_rules = 'Y';
 } else {
     $error_msg_array[] = gettext("You must agree to the forum rules before you can continue.");
     $valid = false;
 }
 if (isset($_POST['logon']) && strlen(trim($_POST['logon'])) > 0) {
     $logon = mb_strtoupper(trim($_POST['logon']));
     if (mb_strlen($logon) < 3) {
         $error_msg_array[] = gettext("Username must be a minimum of 2 characters long");
         $valid = false;
     }
     if (mb_strlen($logon) > 32) {
         $error_msg_array[] = gettext("Username must be a maximum of 15 characters long");
         $valid = false;
     }
     if (logon_is_banned($logon)) {
         $error_msg_array[] = gettext("Logon not permitted. Choose another!");
         $valid = false;
     }
 } else {
     $error_msg_array[] = gettext("A logon name is required");
     $valid = false;
 }
 if (isset($_POST['pw']) && strlen(trim($_POST['pw'])) > 0) {
     $password = trim($_POST['pw']);
     if (mb_strlen($password) < 6) {
         $error_msg_array[] = gettext("Password must be a minimum of 6 characters long");
         $valid = false;
     }
 } else {
     $error_msg_array[] = gettext("A password is required");
Ejemplo n.º 2
0
 // Duplicate the user_info array.
 $user_info_new = $user_info;
 // Required Fields
 if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0) && $admin_edit || $profile_uid == $_SESSION['UID'] && $admin_edit === false) {
     if (forum_get_setting('allow_username_changes', 'Y') || session::check_perm(USER_PERM_ADMIN_TOOLS, 0, 0) && $admin_edit) {
         if (isset($_POST['logon']) && strlen(trim($_POST['logon'])) > 0) {
             $user_info_new['LOGON'] = trim($_POST['logon']);
             if (mb_strlen($user_info_new['LOGON']) < 2) {
                 $error_msg_array[] = gettext("Username must be a minimum of 2 characters long");
                 $valid = false;
             }
             if (mb_strlen($user_info_new['LOGON']) > 15) {
                 $error_msg_array[] = gettext("Username must be a maximum of 15 characters long");
                 $valid = false;
             }
             if (logon_is_banned($user_info_new['LOGON'])) {
                 $error_msg_array[] = gettext("Logon not permitted. Choose another!");
                 $valid = false;
             }
             if (user_exists($user_info_new['LOGON'], $profile_uid)) {
                 $error_msg_array[] = gettext("Sorry, a user with that name already exists");
                 $valid = false;
             }
         } else {
             $error_msg_array[] = gettext("A logon name is required");
             $valid = false;
         }
     }
     if (isset($_POST['nickname']) && strlen(trim($_POST['nickname'])) > 0) {
         $user_info_new['NICKNAME'] = strip_tags(trim($_POST['nickname']));
         if (nickname_is_banned($user_info_new['NICKNAME'])) {