Is it possible to re-generate and email a random new password to all users ? Or have I to do it user by user?

Hi, I have seen that in user details, I can click on the button to re-generate a new password and email it to the user.
Is there the possibility to do this thing, but for all users? Withour entering in each user detail and click on that button ? Of course different for each user
thans

Hello,

You should do it one by one for each user or if you want to do it automatically;
You can create a planned task and run it only for one time.

ok thanks for your answer. how can I create a planning task? where? I’m new on Dolibarr

It is under Admin Tools-> [Scheduled jobs] (Or planned tasks)
However you need to know Dolibarr PHP Classes to create a planned tasks.

Also, you could use REST or SOAP api to change passwords.
But again, you have to write a short script to get every user from DB and make API call for each user.

Documentation: WS to change password of an user
Name: setUserPassword
Binding: WebServicesDolibarrUserBinding
Endpoint: https://yourserver.com:443/webservices/server_user.php
SoapAction: http://www.dolibarr.org/ns/#setUserPassword
Style: rpc
Input:
use: encoded
namespace: http://www.dolibarr.org/ns/
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: setUserPasswordRequest
parts:
authentication: tns:authentication
shortuser: tns:shortuser
Output:
use: encoded
namespace: http://www.dolibarr.org/ns/
encodingStyle: http://schemas.xmlsoap.org/soap/encoding/
message: setUserPasswordResponse
parts:
result: tns:result
id: xsd:string
Namespace: http://www.dolibarr.org/ns/
Transport: http://schemas.xmlsoap.org/soap/http

1 Like

ok thanks for your answer

If you need help with scheduled tasks, please don’t hesitate to ask.