Drag to reposition your photo
Welcome to phpFox community
Threads
Quote:
Originally posted by: webwolf

Well, if I were going to do this I would set username on registration off to make the username input go away. Then I would make 2 plugins.

*Product: core
*Module: user
Title: UserNameCheck
Hook: user.service_process_add_1
Active: yes
code:
PHP:
if (Phpfox::getParam('user.split_full_name'))
{
    
$aVals['full_name'] = $aVals['first_name'] . ' ' $aVals['last_name'];
}
$aVals['user_name'] = str_replace(' ''_'$aVals['full_name']);
$aInsert['user_name'] = $oParseInput->clean($aVals['user_name']);
Phpfox::getService('user.validate')->user($aInsert['user_name']);
$sSiteUserName=$aInsert['user_name']; 


and

*Product: core
*Module: user
Title: UserNameChange
Hook: user.service_process_add_feed
Active: yes
code:
PHP:
$this->database()->update(Phpfox::getT('user'), array('user_name' => $sSiteUserName), 'user_id = ' $iId); 


This will make the user_name a title-ized version of the full_name for registrants. Developed on 3.7.0 but only briefly tested.


Wow man, no words for you. Perfect, just what i wanted. Please send me on PM your paypal, I gonna send little bit bonus for your help.

You make me so happy today.
January 21, 2014 1:47 pm
yes i havent checked yet but it would be nice to do because i am seeing alot of sites like fling.com and they get alot of traffic from other fake sites they make that when people signup they are really signing up on fling's registration but on a different splash page...
April 13, 2013 4:47 am