You are here

public static function ProfileCompleteProfileController::hasEmptyRequiredFields in Complete profile 7

Overrides CompleteProfileControllerInterface::hasEmptyRequiredFields

File

includes/ProfileCompleteProfileController.php, line 19

Class

ProfileCompleteProfileController

Code

public static function hasEmptyRequiredFields($account) {
  return (bool) db_query("SELECT 1 FROM {profile_field} f LEFT JOIN {profile_value} v ON f.fid = v.fid WHERE uid = :uid AND f.required = 1 AND f.register = 1 AND (v.value IS NULL OR v.value = '' OR (f.type = 'checkbox' AND v.value = '0'))", array(
    ':uid' => $account->uid,
  ))
    ->fetchField();
}