method setData documentation in bbn\User
Stores or deletes data in the object for the current authenticated user.
function($index, $data = NULL)
{
if (!$this->auth) {
throw new Exception(X::_("Impossible to store data on an unauthenticated user"));
}
if (is_array($index) && X::isAssoc($index)) {
foreach ($index as $k => $v) {
// Unsetting if null
if (is_null($v) && array_key_exists($k, $this->data)) {
unset($this->data[$k]);
} else {
$this->data[$k] = $v;
}
}
} elseif (is_string($index)) {
$this->data[$index] = $data;
} else {
throw new Exception(X::_("Invalid parameters for function setData in user class"));
}
return $this;
}
Stores or deletes data in the object for the current authenticated user. 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