prolateral Posted October 11, 2021 Share Posted October 11, 2021 The GetUsers internal API call requires an email -- there is a GetClientDetails that allows us to retrieve info via the API for Client accounts given an id; but there doesn't seem to be any way to get access to a User's details without knowing the email. We are trying usefully use the UserPasswordChanged hook - but it only provides a 'user_id' User ID -- and no possibility of working out what Client accounts that impacts... Given a User 'user_id' -- how can we retrieve any more information via API? Thanks in advance... -Craig 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted October 11, 2021 Share Posted October 11, 2021 If you have the ID and are local, using the classes / Eloquent Models is better than API, IMO. https://classdocs.whmcs.com/8.0/ An example of this would be: use WHMCS\User\Client; $User = Client::find($user_id); if ($Client) { //Do your code } That gets you the user, which could be a client or could be a user of a client and so using $Client->owner() might be needed. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.