username length problem

Discussion in 'Installation/Configuration' started by towershooter, Feb 17, 2007.

  1. towershooter

    towershooter New Member

    I have made a change in form 'isp - ISP User' --> 'user_username' --> 'max. Length:' to 64 and I changed the regular expression to read:

    // Überprüfung Username mittels regex, bei Fehler löschen
    if(!preg_match("/^[a-z][\w\.\-\_]{3,128}$/",$user_prefix . $username)) {
    $go_api->db->query("DELETE from isp_isp_user where doc_id = '$doc_id'");
    $go_api->db->query("DELETE from isp_nodes where doc_id = '$doc_id' and doctype_id = '$doctype_id'");
    $go_api->errorMessage('<b>'.$go_api->lng("Feld").': Username</b><br>'.$go_api->lng("Der Username muss aus min. 4, max 32 Buchstaben oder Zahlen bestehen, wobei er mit einem Buchstaben beginnen muss.") . "<br>&nbsp;<br>");

    It still does not allow more than 32 characters.

    Any thoughts?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The regular expression is in the file twice, one for updates and one for inserts. You will have to change both.
  3. towershooter

    towershooter New Member

    My apologies but I can only find three 'preg_match' expressions in the file. One is for the username and two are for the email.

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You are right, I mixed this up with the email regex.

    Please check that the length uf the field user_username in the database table isp_isp_user has been changed to 64 too.

Share This Page