Results 1 to 4 of 4

Thread: How Can I Prevent Spaces and @ in Joomla Usernames?

  1. #1
    vectro's Avatar
    vectro is offline I Like Stuff
    Join Date
    Dec 2008
    Location
    U.S.A.
    Posts
    630
    Thanks
    192
    Thanked 104 Times in 82 Posts

    How Can I Prevent Spaces and @ in Joomla Usernames?

    I'm have a strange situation with Joomla. I need Joomla usernames to be synced with usernames on a Linux system. That part is taken care of, but there is another issue. Joomla allows blank spaces and the @ symbol in usernames. Those symbols are not compatible with the way Linux handles usernames.

    Is there a way to prevent those symbols from being used during registration without modifying the Joomla core?

    Second question. Is there a way to limit Joomla usernames to min. 4 characters max. 8 characters?

  2. #2
    proweb's Avatar
    proweb is offline Joomla Developer
    Join Date
    Jan 2010
    Posts
    217
    Thanks
    4
    Thanked 24 Times in 23 Posts
    I think that this will require some code modifications in the core joomla files. Other way I don't see how can you restrict space and '@'

    You should modify 'components/com_user/controller.php' in the Joomla installation to obtain what you want.

    If you need help, drop me a message.
    Find Best Web Hosting Service. It's good or bad host? - JustHost Review
    Download free joomla themes for version 1.5 and 1.6

  3. Thanked by:

    vectro (19 August, 2010)

  4. #3
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Quote Originally Posted by proweb View Post
    You should modify 'components/com_user/controller.php' in the Joomla installation to obtain what you want.
    Not media/system/js/validate.js?
    Code:
                    this.setHandler('username',
                            function (value) {
                                    regex = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&]", "i");
                                    return !regex.test(value);
                            }
                    );
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  5. #4
    proweb's Avatar
    proweb is offline Joomla Developer
    Join Date
    Jan 2010
    Posts
    217
    Thanks
    4
    Thanked 24 Times in 23 Posts
    There are many options in joomla which will restrict the user registration, but I listed the core file, which I used before.

    I already changed this on a client's website, who needed some ID verifications as well on user registration, and worked perfectly...
    Find Best Web Hosting Service. It's good or bad host? - JustHost Review
    Download free joomla themes for version 1.5 and 1.6

Similar Threads

  1. [WTS] I am selling 125x125 ad spaces
    By Jgblogging in forum Advertising
    Replies: 0
    Last Post: 29 April, 2010, 18:49 PM
  2. [WTS] Twitter Acounts - 3 Letter Usernames
    By stickycarrots in forum Marketplace
    Replies: 0
    Last Post: 13 April, 2010, 23:19 PM
  3. Replies: 2
    Last Post: 8 March, 2010, 12:10 PM
  4. Post your Usernames in other forums here...
    By sandeepdude in forum Forum Life
    Replies: 20
    Last Post: 8 September, 2009, 19:54 PM
  5. How to prevent filters from blocking your proxy?
    By Aquarezz in forum Web Proxies
    Replies: 2
    Last Post: 15 April, 2009, 22:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •