Hi Flynax Supporter,
Is there anyway to restrict username when register for new account?
So far I saw username that has only 3 characters like: abc
Some of them has space: he lo
Is there anyway to restrict it to at least 4 characters and no space?
Hi Flynax Supporter,
Is there anyway to restrict username when register for new account?
So far I saw username that has only 3 characters like: abc
Some of them has space: he lo
Is there anyway to restrict it to at least 4 characters and no space?
Hello Wei,
If you want you can do it yourself.
go to ftp://libs>>javascript>>flynax.lib.js find method: this.registration
find code:
and above add new :Code:Only registered members can view the code.
Code:Only registered members can view the code.
then find code:
and replace to:Code:Only registered members can view the code.
save it. Then open file: ftp://includes>>classes>>rlAccount.class.phpCode:Only registered members can view the code.
find method: ajaxSubmitProfile
and code in:
and change 3 to 4 save.PHP Code:
Only registered members can view the code.
Then open file: ftp://templates>>your_template>>tpl>>js_config.tpl
find line:
and above add new 1:Code:Only registered members can view the code.
save and check username on registration page. I think it should workCode:Only registered members can view the code.
Last edited by Viktor; March 28, 2014 at 04:03 AM.
Viktor,
Flynax technical department,
Best wishes.
Thank you so much for your hard work as always Viktor
Best regards,
Hi,
Is there anyway to restrict the name of seller page to more than 4 characters? Because some users make their url when they register like this: www.domain.com/01, www.domain.com/02
And it is not accessible, return 404 error.
That from memory is an automated thing where flnax auto ads the /01 02 etc when a user name already exists, from memory it is on auto / instant sign up thingo forget the correct name. If so then Viktor set mine that made them create a new user name and not get the 01 / 02 etc. extension so check with him if so.
Hi Pete, but there is an option for user to create their own page url. And it is on on my site. For example if user register with the unique username: abcde <--- He/she has the option to choose his/her profile page url, so for this case, this user abcde picked www.domain.com/ab <-- for example I use ab instead of 01/02. The system still let it pass. And obviously that url return 404 error. So this user abcde can't access his profile page he picked which is domain.com/ab.
Hello Wei,
Yes it is possible. You need to create 1 condition.
Go to ftp://includes>>classes>>rlAccount.class.php in method: validateUserLocation
find 1-st condition and add new 1 after that:
Also you should add new phrase in Admin Panel >> Languages with key: personal_address_shortPHP Code:
Only registered members can view the code.
save and check try to register new user again.
Viktor,
Flynax technical department,
Best wishes.
Hi Viktor,
THank you for your instruction. But I couldn't find the method: validateUserLocation. My flynax is using 4.3, is it the reason?
I found this code instead:
/* check personal address */
if ( $account_types[$type]['Own_location'] )
{
/* validate */
$location = trim($location);
preg_match('/[\W]+/', str_replace(array('-', '_'), '', $location), $matches);
if ( empty($location) || !empty($matches) )
{
$errors .= '<li>'. $lang['personal_address_error'] .'</li>';
$fields .= 'profile[location],';
}
/* check for uniqueness */
$wildcard_deny = explode(',', $config['account_wildcard_deny']);
$this -> setTable('pages');
$deny_pages_tmp = $this -> fetch(array('Path'), null, "WHERE `Path` <> ''");
foreach ($deny_pages_tmp as $deny_page)
{
$wildcard_deny[] = $deny_page['Path'];
}
unset($deny_pages_tmp);
$rlValid -> sql( $location );
if ( in_array($location, $wildcard_deny) || $this -> getOne('ID', "`Own_address` = '{$location}'", 'accounts') )
{
$errors .= '<li>'. $lang['personal_address_in_use'] .'</li>';
$fields .= 'profile[location],';
}
}
Hi Viktor,
Is there any fix for 4.3? Or only 4.4?
Hello Wei Hong,
Would you please send me your site with version 4.3 I will check and give you instruction for 4.3 version too.
Viktor,
Flynax technical department,
Best wishes.