public static function getIsAvailableForStateJob($userId) { $userProfile = \common\models\UserProfile::findUserByAttr(['user_id' => $userId]); if (!empty($userProfile) && !empty($userProfile->available_for_stat_job) && $userProfile->available_for_stat_job == 'yes') { return 1; } else { return 0; } }