public static function hasWheel($userId) { $wheel = Wheel::model()->find('user_id=:userId', array(':userId' => $userId)); if ($wheel) { return true; } else { return false; } }