PMFCreateUser, initRBAC() calling on null
Posted: Wed Mar 27, 2019 5:06 am
Hi,
I am trying to call the PMFCreateUser () from within my endpoint class that i created
How we can fix this
I am trying to call the PMFCreateUser () from within my endpoint class that i created
Code: Select all
/**
* @url POST /save/client
*/
public function saveUser(){
//Get values of the posted input
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$password = $_POST['password'];
$rPassword = $_POST['rpassword'];
$email = $_POST['email'];
$court_address = $_POST['court_address'];
$lawyer_level = $_POST['lawyer_level'];
$lawyer_number = $_POST['lawyer_number'];
isset($_POST['pmUid']) ? $pmUid = $_POST['pmUid'] : $pmUid = "";
PMFCreateUser($lawyer_number, $password, $first_name, $last_name, $email, "LAWYER_CLIENT");
}
Code: Select all
I read in another post that this is due to a login problem, but I thought that once we are authenticated to call rest endpoints it should work just fine.[2019-03-26 23:48:13] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function initRBAC() on null in /opt/processmaker/workflow/engine/classes/WsBase.php:1111
Stack trace:
#0 /opt/processmaker/workflow/engine/classes/class.pmFunctions.php(2209): WsBase->createUser('55555', 'xc', 'wxc', 'admin@oo.com', 'LAWYER_CLIENT', '55555', NULL, NULL)
#1 /opt/plugins/estamp/estamp/src/Services/Api/Estamp/Client.php(165): PMFCreateUser('55555', '55555', 'xc', 'wxc', 'admin@oo.com', 'LAWYER_CLIENT')
#2 [internal function]: Services\Api\Estamp\Client->saveUser()
#3 /opt/processmaker/framework/src/Maveriks/Extension/Restler.php(169): call_user_func_array(Array, Array)
#4 /opt/processmaker/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php(278): Maveriks\Extension\Restler->call()
#5 /opt/processmaker/framework/src/Maveriks/WebApplication.php(245): Luracast\Restler\Restler->handle()
#6 /opt/processmaker/framework/src/Maveriks/WebApplication.php(158): Maveriks\WebApplication->dispatchApiRequest('/estamp/save/cl...', '1.0')
#7 /opt/processmaker/workflow/public_html/app.php(49): Maveriks\WebApplication->run('service.api')
#8 {main}
How we can fix this