Remember me

Php script for adding user to joomla database

3 years 9 months ago #1

  • sen's Avatar
  • sen
  • Posts: 14
I am creating a user registration form for new joomla user registration and adding new fields. I am wondering how i can add a user using Balbooa Forms into our joomla database, together with an administrator activation? Is there a ready php script i can use or modify from?
Is there any way to do this?

3 years 9 months ago #2

  • Viacheslav's Avatar
  • Viacheslav
  • Posts: 28858
Thank you for contacting us

Unfortunately, this is not possible

Best Regards,
Vyacheslav, Balbooa Support Team

3 years 9 months ago #3

  • sen's Avatar
  • sen
  • Posts: 14
Actually, it is possible. We just need the right php script calls. I did some investigation and for those who need this function into Balbooa's beautiful forms, you can modify the script below: (if you need to setup user activation by admin, its possible too, but the script below is for basic user insertion to joomla user db)

define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );//this is when we are in the root

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

$app = JFactory::getApplication('site');

/* you may want to change this*/
$params = array(


$udata = array(
    'groups'=>array(2), // set the usergroup(s) here (id)


$user = new JUser;

    echo '<pre>';
    echo 'Bind user data: ';

    echo 'Save user data: ';

    echo 'Testing login: ';
    var_dump( $app->login( array('username'=>$params['username'],'password'=>$params['password']) ) );

} catch (Exception $ex) {

    echo 'Exception: ',  $e->getMessage(), '\n';


3 years 3 months ago #4

  • Stephan's Avatar
  • Stephan
  • Posts: 324
Hallo Sen,

Did you have any success in creating the login and registration form with Balbooa Forms?

Kind Regards


3 years 4 weeks ago #5

  • Vanderlei Frari's Avatar
  • Vanderlei Frari
  • Posts: 94
Sen, where do you put this script? In button?
Powered by Kunena Forum