Jump to content
Remitur

custom client fields values retrieving

Recommended Posts

Hello.


Does exist a way (different from a direct mysql query) to retrieve the values of custom client fields for a certain customer?

I looked around in API and documentation, but was not able to find anything about... 😞

 

Edited by Remitur

Share this post


Link to post
Share on other sites

Perhaps something like this...

<?php
use WHMCS\User\Client;

// get client's custom fields
$clientFields = Client::find($userID)->customFieldValues;

// run through customfields
foreach($clientFields AS $field){
  //...do something
}

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines