Hi,
Just wondering if it is possible to get it working with joombri freelance?
This is from my router file:
switch($layout){
//guest
case 'register':
$vars = 'guest';
break;
case 'showfront':
$vars = 'guest';
break;
case 'usergroupfield':
$vars = 'guest';
break;
This is in the controller file:
/* Misc Functions */
//1.Check Username & Email (ajax)
function checkUser(){
// Check for request forgeries
JSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));
$app = JFactory::getApplication();
$db = JFactory::getDbo();
$inputstr = $app->input->get('inputstr', '', 'string');
$name = $app->input->get('name', '', 'string');
if($name == 'username'){
$query = "SELECT COUNT(*) FROM #__users WHERE username=".$db->quote($inputstr);
$msg = 'COM_JBLANCE_USERNAME_EXISTS';
}
elseif($name == 'email'){
$query = "SELECT COUNT(*) FROM #__users WHERE email=".$db->quote($inputstr);
$msg = 'COM_JBLANCE_EMAIL_EXISTS';
}
$db->setQuery($query);
if($db->loadResult()){
echo JText::sprintf($msg, $inputstr);
}
else {
echo 'OK';
}
exit;
}
}
This is the register file:
Did not realize it was not using the first part of the default joomla registration page.
Any help would be appreciated to get it working.