// at Phase VIII - check to see if everyone else in the group is also at step 3 - if so, notify the manager and set a flag on the lead tenant to say he has been notified of the need to send out the AST $lead_tenant_email = get_userdatabylogin($current_user->group)->user_email; if ($lead_tenant_email) { // don't bother looking if there is no lead tenant $loop = new WP_Query("post_type=properties"); global $post; while ($loop->have_posts()) { $loop->the_post(); $the_ID = get_the_ID(); $IPN_payer_email = get_post_meta($the_ID, 'ipn_payer_email', true); if ($IPN_payer_email == $lead_tenant_email) { $paid_holding_deposit = $the_ID; } } if ($paid_holding_deposit) { checkAllApplicants($propertyID); } } get_header(); ?> <div id="content"> <div class="container"> <div class="description"> <br> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <?php the_content();
$submitter_login = $_GET['submitter']; if ($submitter_login) { $submitter = get_userdatabylogin($submitter_login); update_user_meta($submitter->ID, 'submitted_to_paragon', $paragon_reference); // refresh the user object after updating the meta if ($submitter_login == $lead_tenant->user_login) { $lead_tenant = get_userdatabylogin($submitter_login); } else { foreach ($persons as $id => $person) { if ($submitter_login == $person->user_login) { $persons[$id] = get_userdatabylogin($submitter_login); } } } // it's possible this is the last action in a progress step, so check whether all students in the group are ready checkAllApplicants($postID); // $postID is the property ID } } ?> <li class="grid24-17col heading marginbottomsmall marginleft"> <div class="grid24-5col left"> Applicant </div> <div class="grid24-3col left marginleft"> Guarantor </div> <div class="grid24-3col left marginleft"> Deposit </div>
// only the lead tenant needs to have submitted_housemate_info if ($paid_security_deposit && $submitted_housemate_info && $submitted_guarantor_info && $submitted_to_paragon) { $approved_for_step_3 = TRUE; } } else { if ($paid_security_deposit && $submitted_guarantor_info && $submitted_to_paragon) { $approved_for_step_3 = TRUE; } } if ($approved_for_step_3) { $progress_step = 3; if ($signed_AST) { $progress_step = 4; } else { // at Phase VIII - check to see if everyone else in the group is also at step 3 - if so, notify the manager and set a flag on the lead tenant to say he has been notified of the need to send out the AST checkAllApplicants($paid_holding_deposit); } } } ?> <div class="module"> <a href="#top" rel="self" class="right topLink">top ^</a> <a name="progress"></a><h3 class="green">Moving-in Progress<?php echo $is_lead_tenant ? " (Lead tenant)" : ""; ?> </h3> <div> <div id="progressPanel" class="grid6col left"> <p<?php echo $progress_step == 1 ? ' class="current"' : ''; ?>