Updating a new user entity field via REST API

  • Thread starter Thread starter giperfast
  • Start date Start date

giperfast

Guest
Member
I extended the "XF\Entity\User" class to add a new field to get it when authorizing with ('api/auth/from-session').
The code looks like this:
PHP:

Code:

Code:
class User extends XFCP_User
{
    protected function setupApiResultData(\XF\Api\Result\EntityResult $result, $verbosity = self::VERBOSITY_NORMAL, array $options = [])
    {
        parent::setupApiResultData($result, $verbosity, $options);

        $result->includeColumn(['system_information']);
    }

    public static function...
...

Read more

Continue reading...
 
Top