Retrieve user option that can be either per Site or global.

If the user ID is not given, then the current user will be used instead. If the user ID is given, then the user data will be retrieved. The filter for the result, will also pass the original option name and finally the user id as the third parameter.

Uses get.user.option.$option filter.


  • Full name: get_user_option
  • Defined in: cms/core/Shared/Helpers/user.php

Parameters

Parameter Type Description
$option string User option name.
$userId string User ID.

Return Value

bool|string|int|array|null

User option value on success or null on failure.