Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

How to disallow Turkish Characters in username field when registering?

12 years 4 months ago
  • tumer's Avatar
    Topic Author
  • tumer
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

Hi there,

When users register with my Joomla 3x site with Jomsocial, the username field accepts any character typed in. When users use Turkish characters like ş,ü, then this causes problem for some of my extensions. I need to disallow the typing of these characters, and have the registration form allow only english characters and warn the user. How can I set this up? I have made a short search, but couldn't find such a feature in neither joomla nor jomsocial.

12 years 4 months ago
  • tumer's Avatar
    Topic Author
  • tumer
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

It also accepts spaces in usernames, which is another thing I need to disallow

12 years 4 months ago
Licenses:

Hi Tumer,

you must edit /components/com_community/controllers/register.php line 1017:

from
if (!empty($username)) {
            if (!CValidateHelper::username($username)) {
                $isInvalid = true;
                $msg = JText::_('COM_COMMUNITY_IMPROPER_USERNAME');
            }
        }

to

if (!empty($username)) {
    if (!CValidateHelper::username($username)) {
        $isInvalid = true;
        $msg = JText::_('COM_COMMUNITY_IMPROPER_USERNAME');
    } else if (!(preg_match("/[a-zA-Z\s\d]/i", $username))) {
        $isInvalid = true;
        $msg = JText::_('COM_COMMUNITY_IMPROPER_USERNAME');
    }
}

this changes will gone at upgrade process. I suggest you to make a note or make backup file for this. if gone you can easily put this back.

if you don't know how to do it. please provide me FTP access detail, by editing your first post at this topic and put it at Site Info form. if that form can't find it, you can send me via private message.

Regards,
Albert

12 years 4 months ago
  • tumer's Avatar
    Topic Author
  • tumer
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

I have just added FTP details. I need one more favor, please: I gues there is a problem with the "forgot password". It sends mail with a link, but when the user changes his/her password using that link, they still cannot have access to the site. Could you also have a look at it?

Thanks in advance

12 years 4 months ago
Licenses:

Hi Tumer,

for disallow white space, please edit my prev code

from
preg_match("/[a-zA-Z\s\d]/i", $username)

to 
preg_match("/[a-zA-Z\d]/i", $username)

FYI: seem your site info is wrong, because I cant find any joomla site at there. (domain: languagespot)

and about forget password issue. please open new topic with valid site info detail.

Regards,
Albert

12 years 4 months ago
  • tumer's Avatar
    Topic Author
  • tumer
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

My main domain is tumeraltas.com.tr. The other two domains I set for support are not valid. So, could you please update my support account for tumeraltas.com.tr. Moreover, I would ask you to do the necessary changes to the above mentioned two issues. The "forgot password" issue is still causing trouble.

Kind regards

12 years 4 months ago
Licenses:

Hi Tumer,

your support account already updated to tumeraltas.com.tr. Our support manager did it. please check it to make sure about that.
and for other issue if still any. please open new topic for that.

Regards,
Albert

The following user(s) said Thank You: tumer
12 years 4 months ago
  • tumer's Avatar
    Topic Author
  • tumer
  • Offline
  • Fresh Boarder
  • Posts: 20
  • Thank you received: 0
Licenses:
JomSocial Active Socialize Expired

I am now opening a new topic with the same two issues. Thanks a lot

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW