Solved User API data returns boolean for "user_title" instead of string

This topic has been solved
P

Painbaker

Guest
\XF\Entity\User::setupApiResultData:


PHP:

$result->user_title = $this->custom_title !== '' ?: $this->app()->templater()->getDefaultUserTitleForUser($this);


Result:

JSON:

Code:
{
  "user": {
    ...
    "user_title": true,
    ...
   }
}

Continue reading...