I am knew in this world of the SOAP and XML world, i look and look but no so much functional examples could be found there for many task with this api.
So reading the fork i used the api found in this link https://github.com/zimbra-api/zimbra-api/ and I could make it work for resetting the password of the user as follow:
If any is looking a functional example, i leave it here.
So reading the fork i used the api found in this link https://github.com/zimbra-api/zimbra-api/ and I could make it work for resetting the password of the user as follow:
Code:
<?php
// This file is generated by Composer
require_once 'vendor/autoload.php';
$api = \Zimbra\Admin\AdminFactory::instance('https://10.0.10.40:7071/service/admin/soap');
$api->auth('admin', admin.zimbra.password');
$account = new \Zimbra\Struct\AccountSelector(\Zimbra\Enum\AccountBy::NAME(), 'mailbox@example.com');
$id = ((array)$api->getAccountInfo($account)->a[0])["_"];
echo $id."\n";
$passwordInfo = $api->setPassword($id,"MyNewPassword.2341");
If any is looking a functional example, i leave it here.
Statistics: Posted by rojoblandino — Tue Feb 01, 2022 9:01 am