Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By lungtung on
Hi,
I want to set limit username and password length when user register new account ?
I don't want some user on my site (www.drupalvn.org) register new acount as a name: 1 or a or b or....
I know i can set deny in "Access rules" (admin panel) but i can't set all because its too much
sorry for my bad english
jingjang
Drupalvn.org - drupal vietnam community
Comments
Let's say you want to set
Let's say you want to set the minimum length of username to be 6. Here's how to setup an access rule:
Access Type: allow
Rule Type: username
Mask: ______%
That's 6 dashes (_), followed by a percent sign.
I think that should work.
Deepak
=-=
6 underscores
OK, i have test, but its not
OK, i have test, but its not work ???
after i do that, i click "check rules"
And drupal show me the message: "The username lan is allowed."
I think its not work
Any suggess ?
Thanks
and i try to deny username
sorry, i think i must read some handbooks
subscribe
subscribe
Drupal samurai for hire, based in Buffalo, New York, USA.
15+ years Drupal, 20+ years web.
http://basicmagic.net
If you have not figured out
If you have not figured out yet how to do this, here's something I came up with. I don't know if it's the proper way to go about it, but it DOES work.
Username (3-14 characters long)
deny username %_______________
deny username _
deny username __
Set these three rules -- all are deny rules associated with username. Copy and paste the rule (after username) and you should have a total of 3 rules set. Then adjust accordingly to your needs. the top rule is obviously the "no more than 14" character rule. If you need more "minumum" length you'll have to add more rules with more characters. Aparently you have to manually set every character. Time-consuming, but it works. I don't know again if this is the way to do it, but -- hey it works.
Hi GreenLED Yes, now i can
Hi GreenLED
Yes, now i can say with you "hey it works"
many thank (-:
Drupal Vietnam community
Does Drupal 6 have some more
Does Drupal 6 have some more controls for this? I haven't installed D6 yet so I was just wondering.
» Respectfully, GreenLED
»
=-=
access rules are the same in D6 as they are in D5 and are handled in administer -> access rules
I had hoped that there would
I had hoped that there would be some more development on those controls, but thanks for the information anyhow.
» Respectfully, GreenLED
»
Username (6+ characters
Username (6+ characters long)
deny username _%
allow username _______%
I'd like to reserve 4 (and
I'd like to reserve 4 (and less) letter accounts for special users. Only admin could create the account with less than 5 letters username.
How can I set the rules to let those special users normally login to their accounts ?
first set a 'deny' access
first set a 'deny' access rule for 4 characters and less as noted in the above comments
and then 'allow' access to those usernames that the admin creates
E Ismail
I'm surprised that you can
I'm surprised that you can set a minimum password length without creating rules, yet you still have to create rules to specify username length. Shouldn't this functionality be built in by now (D6)?
=-=
Isn't available in D7 core either. When someone codes it and put's up a patch is when it will get into core I'd guess.
Does this apply to spam registration
@VM
I noted that almost all the usernames of spam registrations are using long username. An Idea occurred to my mind, that if I use this rule and restrict the user name to be tween 4-8, these spammers will get busted. I also thought that spammers use different mechanism that do not go through these access rules. What do you think. I am suffering especially from Drupal 6 where Captcha and Botcha did not prove effective.
=-=
that decision is yours. Any legitimate user that inputs a long user name would also be excluded from doing so. Personally, I'd try other modules than captcha or botcha like honeypot or mother may i. Limiting spam tends to mean you need to employ one or more methods and adjust as spam bots get smarter.
Many thanks
Many thanks for your insight, as I had not heard before about the new modules you mentioned.
BTW
BTW, how about if I want to restrict the size of username to 10. ie not exceeding 10 characters, how one does this by access rules.
=-=
That's explained through out this thread. I suggest reading the comments.
Thanks
Thank you I can note it now.