Page 1 of 1
WebService createUser
Posted: Wed May 04, 2016 7:40 pm
by saidmsl
Hi,
does anyone have a working code for adding an user?
i just get :
Fault occurred while processing.
Re: WebService createUser
Posted: Thu May 05, 2016 8:22 am
by agaspa
Hi said,
Which programming language are you using?
Can you tell me the exact version nuomber of LogicalDOC you have installed?
Br
Alex
Re: WebService createUser
Posted: Thu May 05, 2016 4:34 pm
by saidmsl
Hi,
i'm using LD 7.4.2
i'm using Php (sorry , was assuming it's clear)
i was able to create an user finally the only thing i do not understand it's the groups :
$user['groupIds'] = (object)array(2);
the user is created as an admin and cannot change the group (it's disabled)
i just want to add it to normal users : author, publisher
what is the right way for this?
Rgds
Re: WebService createUser
Posted: Tue May 10, 2016 10:20 am
by agaspa
Hi Said,
the ID of Author group is 2, the ID of the group Publisher is -10000
so your code should be:
Code: Select all
// set the group memberships
$usr ['groupIds'] = [2, -10000]; // Author and Publisher
See also the attached package
Re: WebService createUser
Posted: Tue May 10, 2016 5:03 pm
by saidmsl
Thanks
it works
but there is a bug in the declaration, the code should be :
$usr['groupIds'] = array(2,-10000);
Re: WebService createUser
Posted: Tue May 10, 2016 6:29 pm
by agaspa
It works with PHP 5.4.43
Re: WebService createUser
Posted: Tue May 10, 2016 7:00 pm
by saidmsl
not with php 5.3