Page 1 of 1

How to change status

Posted: Thu Jun 04, 2020 12:31 pm
by subh1
Hi
I would like change Account Status from Active to Closed/Locked. I tried with modifyAccount() to set zimbraAccountStatus but it always through an exception. Can anyone help me to resolve this? I m not sure whether it is possible ?

Re: How to change status

Posted: Thu Jun 04, 2020 5:55 pm
by DualBoot
Hello

show us the command you used and the output.

Regards,

Re: How to change status

Posted: Fri Jun 05, 2020 7:09 am
by subh1
Hi,

I m using https://github.com/zimbra-api/zimbra-api to communicate ZCS with my PHP application.

//set attributes
$dnAttr = new KeyValuePair('displayName', 'John Doe');
$cnAttr = new KeyValuePair('cn', 'John Doe');
$titleAttr = new KeyValuePair('title', 'Dev Manager');
$statusAttr = new KeyValuePair('zimbraAccountStatus', 'Closed');
//Call method
$createAccountRes = $api->modifyAccount ($accountId, [$dnAttr, $cnAttr, $titleAttr]);

After that if I print the response, it gives me all the object attributes with New value; except the
zimbraAccountStatus
.

Thanks for your reply.

Re: How to change status

Posted: Fri Jun 05, 2020 7:45 am
by DualBoot
Maybe you should respected the case with full lower case for the account status.
value : active,maintenance,locked,closed,lockout,pending

Any other clues in the Zimbra log ? Is it possible to use a debug mode ? Did you post an issue in the GitHub repo ? As far as I see, this API could be out of date related to the evolution of Zimbra.

Regards,

Re: How to change status

Posted: Fri Jun 05, 2020 11:03 am
by subh1
Hi

change the status name in small letter did the trick. Thanks a lot. Really appreciate your help 8-)