Hi,
you can create simple plugin to do this, follow these steps:
- Download, install and enable (from plugin manager) our skeleton plugin (you can download this at the end of page
https://www.easy-profile.com/docs/44-triggers.html)
- Edit file /plugins/jsn/skeleton/skeleton.php
- Delete example functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- Add this function
triggerFieldAvatarUpdate($user,&$data,$changed,$isNew){
$db=JFactory::getDbo();
$query='UPDATE #__users SET username='.$db->quote($data['custom_field_alias']).' WHERE id='.$user->id;
$db->setQuery($query);
$db->execute();
}
This query put into 'username' field into database the value of field 'custom_field_alias'
NOTE: this code is not tested and not supported and requires minimun PHP and Joomla knowledge.