Field: Username ..... minimum of 4

Discussion in 'Installation/Configuration' started by iam, Dec 23, 2006.

  1. iam

    iam New Member

    Hello!

    I am trying to create email with 3 tetters login

    for example
    email: [email protected]
    login: xyz

    And I get an error:

    "Field: Username
    The user name has to contain a minimum of 4 and a maximum of 32 letters or figures and has to begin with a letter"


    Is there any possibility to decrease minimum amount of letters in username????

    Yhe thing is that I'am trying to migreate from Communigate with existing usernames and there is already 3 letters usernames there...

    Thanks in advance
    Kirill
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to change the min. username length you will have to change the regular expressions in the username plugin in /home/admispconfig/ispconfig/plugins and mabye the document type definition of the user form in the form designer inside ISPConfig under management.
     
  3. iam

    iam New Member

    Thank you

    it was enough to comment out several lines in
    /home/admispconfig/ispconfig/lib/plugins/isp_username.plugin.php

    Kirill
     
  4. tyson

    tyson New Member

    Last edited: Feb 13, 2007
  5. iam

    iam New Member

    As far as I remember just comment out this block:

    // Ãberprüfung Username mittels regex, bei Fehler löschen
    // if(!preg_match("/^[a-z,0-9][\w\.\-\_]{3,64}$/",$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>");
    // }
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Commenting this out is a really really bad idea as you remove all username checks. This enables everyone with access to ISPConfig to hack your server!

    If you want longer usernames, change the regex from:

    "/^[a-z,0-9][\w\.\-\_]{3,64}$/"

    to e.g.:

    "/^[a-z,0-9][\w\.\-\_]{3,128}$/"
     
  7. iam

    iam New Member

    Yes? I understand this. But this server is used onlu for my purposes. Anyway thank you for advice!

    Kirill
     

Share This Page