Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

By justinopsky
#826734
I have a user registration form by webentry form.
I can create the user but can not associate the user to a specified group, after form submited.
I use this trigger
Code: Select all
//create user
PMFCreateUser(@@textNIF, @@textPassword, @@textPrimeiroNome, @@textUltimoNome, @@textEmail, "PROCESSMAKER_OPERATOR", "", "INACTIVE");
//define Group Name 
$groupName = "AccaoSocial";
//Get Group Name ID
$GroupUID = PMFGetGroupUID($groupName);
$username = @@textNIF;
$result = executeQuery("SELECT USR_UID FROM USERS WHERE USR_USERNAME='$username' ");
if (is_array($result) and count($result) > 0) {
   $aUser = PMFInformationUser( $result[1]['USR_UID'] );
}
//assign user to group
PMFAssignUserToGroup($aUser, $GroupUID);
I get this error
"Non-static method Bootstrap::hashPassword() should not be called statically, assuming $this from incompatible context"

After this the user is cretead but not associeted to the group
#826873
Hi,
Your code must be like this:
Code: Select all
//create user
PMFCreateUser(@@textNIF, @@textPassword, @@textPrimeiroNome, @@textUltimoNome, @@textEmail, "PROCESSMAKER_OPERATOR", "", "INACTIVE");
//define Group Name 
$groupName = "AccaoSocial";
//Get Group Name ID
$GroupUID = PMFGetGroupUID($groupName);
$username = @@textNIF;
$result = executeQuery("SELECT USR_UID FROM USERS WHERE USR_USERNAME='$username' ");
if (is_array($result) and count($result) > 0) {
	//assign user to group
	PMFAssignUserToGroup($result[1]['USR_UID'], $GroupUID);
}
Also you can check this link for more detail:
https://wiki.processmaker.com/3.2/Proce ... roup.28.29

https://www.youtube.com/channel/UCYiyz1 ... jMXodwH1iw
Thanks
Last edited by programerboy on Sun Nov 24, 2019 4:20 am, edited 1 time in total.
Dashboard issue

Hi, Please check your response, this error is beca[…]

Hi!!!! Did you check the wiki, 'cause ProcessMake[…]

Wants to add New Page

Hi, We've implemented the plugins like you need, y[…]

Hi, This is an tested code for use ajax in your fo[…]