Announcement

Collapse
No announcement yet.

How do I disable certain chars in usernames?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I disable certain chars in usernames?

    There are some charactors I'd like disabled in user names. Is there a way I can do this in 2.x and 3.x?

  • #2
    "Illegal User Names" in AdminCP Options, I think.

    Comment


    • #3
      Originally posted by orozery
      "Illegal User Names" in AdminCP Options, I think.
      That didn't work...

      Comment


      • #4
        It only matches the whole username upon registration only I think
        @[email protected]

        Comment


        • #5
          I would like this as well, especially for _ and 1234567890 in a user's name.

          I'm always on my alert toes when I see "Amy_443" register, as an example.

          Syl...

          Comment


          • #6
            The "Illegal Usernames" option only checks during registration. It matches against full or partial usernames. Separate illegal characters or strings with a space in the option box.

            Comment


            • #7
              partial matching should work

              if (strpos(strtolower($_POST['username']), strtolower($val)) !== false)
              Scott MacVicar

              My Blog | Twitter

              Comment


              • #8
                Originally posted by Scott MacVicar
                partial matching should work

                if (strpos(strtolower($_POST['username']), strtolower($val)) !== false)
                Where do I put this?

                If I want to block * ? ! @ # $ etc, what do I do the the code you gave? I hate those chars in usernames.

                Comment


                • #9
                  You put them in the Illegal Usernames options box in the admin cp.

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X