public function getUserSetting(User $user, $name, $default = null)
    {
        if (false === $user->getSettings()->containsKey($name)) {
            $this->loadusersSettings();

            return array_key_exists($name, $this->usersSettings) ? $this->usersSettings[$name] : $default;
        }

        return $user->getSettings()->get($name)->getValue();
    }
public function getUserSetting(User $user, $name, $default = null)
    {
        if (false === $user->getSettings()->containsKey($name)) {
            $this->loadusersSettings();

            return array_key_exists($name, $this->usersSettings) ? $this->usersSettings[$name] : $default;
        }

        return $user->getSettings()->get($name)->getValue();
    }
public function getUserSetting ( User $ user , $ name , $ default = null ) { if ( false === $ user -> getSettings ( ) -> containsKey ( $ name ) ) { $ this -> loadusersSettings ( ) ; return array_key_exists ( $ name , $ this -> usersSettings ) ? $ this -> usersSettings [ $ name ] : $ default ; } return $ user -> getSettings ( ) -> get ( $ name ) -> getValue ( ) ; }
Return a user setting given a user.

@param User   $user
@param string $name
@param mixed  $default

@return mixed
Return a user setting given a user .