method getAllNotMine documentation in bbn\User\Preferences
Returns an array of the users' preferences (the current user and group are excluded) based on the given id_option.
Example
$pref->getAllNotMine('9439491824ef11eca47652540000cfbe', true);
// (array) = [];
function(string $id_option = NULL, bool $with_config = true)
{
if ($id_option = $this->_getIdOption($id_option)) {
$fields = $this->fields;
if (!$with_config) {
unset($fields['cfg']);
}
if (
$rows = $this->db->rselectAll(
[
'table' => $this->class_table,
'fields' => $fields,
'join' => [[
'table' => $this->class_table,
'type' => 'left',
'alias' => 'aliases',
'on' => [
'conditions' => [[
'field' => $this->fields['id_alias'],
'exp' => 'aliases.id'
]]
]
]],
'where' => [
'conditions' => [[
'field' => $this->fields['id_option'],
'value' => $id_option
], [
'field' => $this->fields['public'],
'value' => 0
], [
'logic' => 'OR',
'conditions' => [[
'field' => $this->fields['id_user'],
'operator' => '!=',
'value' => $this->id_user
], [
'field' => $this->fields['id_user'],
'operator' => 'isnull'
]]
], [
'logic' => 'OR',
'conditions' => [[
'field' => $this->fields['id_group'],
'operator' => 'neq',
'value' => $this->id_group
], [
'field' => $this->fields['id_group'],
'operator' => 'isnull'
]]
]]
]
]
)
) {
return $with_config ? array_map(
function ($a) {
$cfg = $a['cfg'];
unset($a['cfg']);
if (($cfg = json_decode($cfg, true))) {
$a = bbn\X::mergeArrays($cfg, $a);
}
return $a;
},
$rows
) : $rows;
}
return [];
}
return null;
}
Returns an array of the users' preferences (the current user and group are excluded) based on the given id_option. 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