montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

Prevent certain usernames from being created #143

Closed numeroteca closed 11 years ago

numeroteca commented 11 years ago

Names such as: pageonex, admin, user, thread, example...

does the devise gem help with this?

rahulbot commented 11 years ago

Verified on dev server. If you try to create an account with one of those names, it returns a normal validation error saying "Username isn't valid".

To add more invalid usernames, just modify the list in the ok_username method of app/models/user.rb.