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 ?
How to change status
- DualBoot
- Elite member
- Posts: 1326
- Joined: Mon Apr 18, 2016 8:18 pm
- Location: France - Earth
- ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers
- Contact:
Re: How to change status
Hello
show us the command you used and the output.
Regards,
show us the command you used and the output.
Regards,
Re: How to change status
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
Thanks for your reply.
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.
- DualBoot
- Elite member
- Posts: 1326
- Joined: Mon Apr 18, 2016 8:18 pm
- Location: France - Earth
- ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers
- Contact:
Re: How to change status
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,
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
Hi
change the status name in small letter did the trick. Thanks a lot. Really appreciate your help
change the status name in small letter did the trick. Thanks a lot. Really appreciate your help
- vnngoanhtuan
- Posts: 9
- Joined: Wed Feb 20, 2019 8:44 am
Re: How to change status
Hi,
Can you help me on this case? I did the same but get error: PHP Fatal error: Uncaught Error: Class 'KeyValuePair' not found in /file.php
Thanks,
Tuan Ngo
Can you help me on this case? I did the same but get error: PHP Fatal error: Uncaught Error: Class 'KeyValuePair' not found in /file.php
Thanks,
Tuan Ngo