Need to call class to add user outside concrete5
I trying to add a user from other php system to my other concrete5 site, but I can't to do.
In the other system I have a form to add users in this system and need to add at the same time, in the concrete5 site. But when I use the class to add user, the logs said that don't found the class in the path of my other system.
The question is, how add the path or how to give the correct instruction in my other php, to use the class of concrete5?
To proof, I do a single php file, with this:
use UserInfo as CoreUserInfo;
use Concrete\Core\Permission\Access\Entity\Entity as PermissionAccessEntity;
use \Concrete\Core\User\Point\Action\Action as UserPointAction;
$userData['uName'] = 'xxxxxxxx';
$userData['uEmail'] = [email protected]';
$userData['uPassword'] = 'xxxxxxx';
$ui = UserInfo::register($userData);
But I receive this message -->
PHP Fatal error: Class 'Concrete\Core\User\UserInfo' not found in /home4/markexf4/public_html/multilevel/whouser.php on line 36
Any can help me?
<?php # DIR_BASE should point to base of your installation define('DIR_BASE', '/var/www/html'); define('C5_ENVIRONMENT_ONLY', true); include(DIR_BASE . '/index.php'); use Concrete\Core\User\UserInfo; $userData['uName'] = 'test'; $userData['uEmail'] = '[email protected]'; $userData['uPassword'] = 'test123'; $ui = UserInfo::register($userData);
See this howto:https://www.concrete5.org/documentation/how-tos/developers/how-to-us...
What's the current way this should be done?