public static function userSetting($string = null, $setting, $userId = null)
{
$userId = $string !== null ? (int) $string : (int) $userId;
$setting = (string) $setting;
// validate
if ($userId === 0) {
throw new Exception('Invalid user id');
}
// get user
$user = User::getBackendUser($userId);
// return
return (string) $user->getSetting($setting);
}