You are here

function pcp_rules_profile_is_completed in Profile Complete Percent 7

Helper function for the condition 'User profile is completed'

1 string reference to 'pcp_rules_profile_is_completed'
pcp_rules_condition_info in ./pcp.rules.inc
Implements hook_rules_condition_info().

File

./pcp.rules.inc, line 34
Integrate rule modules with pcp.

Code

function pcp_rules_profile_is_completed($account) {
  if ($pcpinfo = pcp_get_complete_percentage_data('user', 'user', $account)) {
    return $pcpinfo['current_percent'] == 100 ? TRUE : FALSE;
  }
  else {
    return FALSE;
  }
}