Hi...
Iam working wiht EasySocial + JSJobs. EasySocial is my default registration form.
My problem is : when users register ... JSJobs needs insert into DB some values rules..
I need insert this code :
In below code change bold code with my code/variable
function onAfterStoreUser($user, $isnew, $success, $msg){ //j 1.5
if( $isnew )
{
if(isset($_POST['userrole'])){
$db = &JFactory::getDBO();
$created = date('Y-m-d H:i:s');
$query = "INSERT INTO #__js_job_userroles (uid,role,dated) VALUES (".$user['id'].", ".$user['userrole'].", '".$created."')";
$db->setQuery( $query );
$db->query();
$componentAdminPath = JPATH_ADMINISTRATOR.'/components/com_jsjobs';
$componentPath = JPATH_SITE.'/components/com_jsjobs';
if(file_exists($componentPath.'/JSApplication.php')){
require_once $componentPath.'/JSApplication.php';
$result = JSModel::getJSModel('userrole')->addUser($_POST['userrole'],$user['id']);
}
}
}
}
I need create a combobox in EasySocial registration form to make users choose JSJobs usergroup
1 for empployer
2 for job seeker
Or
I have 2 EasySocial profiles (employer and jobseeker) ... when users choose employer he will be asigned in employer Joomla usergroup and employer EasySocial profile/Usergroup.
So is it possible set in JSJobs DB automatically too??
Thanks in advance
Kazuo