Share ideas, ask questions, and get feedback about developing for ProcessMaker

Moderator: amosbatto

Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
By blokje
#783416
Hello,

I have a problem. we are an International company and we have employees without a firstname (yes that is at least possible in Indonesia).
Is there any way to accomplish this? The Rest API refuses the create the user (as by design).
Tried a space but that is also not accepted.

(We use version 3.0)

Hans
By andreaadamczyk
#814961
Hello blokje,

Currently, ProcessMaker does not support this kind of user creation, but you could first create a user with a number or another nonspecial character instead of a first name.

I have created a user that has a number instead of a first name and it worked fine.

You can also modify the tables RBAC_USERS and USERS in the database, setting the first name as an empty string after the creation of the users.

I hope this helps you.

Best Regards.
By amosbatto
#814962
blokje,
If you are using the createUser() web service, then edit workflow/engine/classes/class.wsBase.php:1150 and change from:
Code: Select all
            if (empty( $firstName )) {
To:
Code: Select all
            if (empty( $firstName ) and empty($lastName)) {
If you are using the POST /user REST endpoint to create the user, then edit workflow/engine/src/ProcessMaker/BusinessModel/User.php:9 and change from:
Code: Select all
        "USR_FIRSTNAME"        => array("type" => "string", "required" => true,  "empty" => false, "defaultValues" => array(),                                               "fieldNameAux" => "usrFirstname"),
To:
Code: Select all
        "USR_FIRSTNAME"        => array("type" => "string", "required" => true,  "empty" => true, "defaultValues" => array(),                                               "fieldNameAux" => "usrFirstname"), 
After making those changes, it should be possible to create a user whose first name is an empty string.
Send for clarification

Cost: Will you be using PM entrerprise or open sou[…]

SMS Gateway

Hello natesh, I have a Get ready to use integrate[…]

delete information after CSV export

thanks for your attention, i have some change on y[…]

Thanx again amosbatto... I'll re-check file permis[…]