UserModel::attributes PHP Méthode

attributes() public static méthode

Reliably get the attributes from any user array or object.
public static attributes ( array | object $user ) : array
$user array | object The user to get the attributes for.
Résultat array Returns an attribute array.
    public static function attributes($user)
    {
        $user = (array) $user;
        $attributes = $user['Attributes'];
        if (is_string($attributes)) {
            $attributes = dbdecode($attributes);
        }
        if (!is_array($attributes)) {
            $attributes = [];
        }
        return $attributes;
    }
UserModel