method getByOption documentation in bbn\User\Preferences
Returns the current user's preference and the config if second parameter set to true, based on the given option id, his own profile and his group.
Example
$pref->getByOption('944190af24ef11eca47652540000cfbe', true);
// (array) = [
// "path" => "/",
// "host" => "",
// "user" => "",
// "type" => "local",
// "id" => "8380126d2b4d11eca47652540000cfbe",
// "id_option" => "944190af24ef11eca47652540000cfbe",
// "num" => null,
// "id_user" => "930cc07724ef11eca47652540000cfbe",
// "id_group" => null,
// "id_alias" => null,
// "public" => 0,
// "id_link" => null,
// "text" => 1
// ];
$pref->getByOption('944190af24ef11eca47652540000cfbe', false);
// (array) = [
// "id" => "8380126d2b4d11eca47652540000cfbe",
// "id_option" => "944190af24ef11eca47652540000cfbe",
// "num" => null,
// "id_user" => "930cc07724ef11eca47652540000cfbe",
// "id_group" => null,
// "id_alias" => null,
// "public" => 0,
// "id_link" => null,
// "text" => 1,
// "cfg" => "{"path":"\/","host":"","user":"","type":"local"}"
// ]
function(string $id_option, bool $with_config = true)
{
if ($id = $this->retrieveUserIds($id_option, $this->id_user)) {
return $this->get($id[0], $with_config);
}
return null;
}
Returns the current user's preference and the config if second parameter set to true, based on the given option id, his own profile and his group. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions