| @@ -466,12 +466,13 @@ | ||
| 466 | 466 | return array('type' => 'fixed', 'time' => $auto_eot_time, 'tense' => $auto_eot_time <= $now ? 'past' : 'future', |
| 467 | 467 | 'debug' => 'This is a fixed EOT time recorded by s2Member. It can be altered in the WordPress Dashboard for this user.'); |
| 468 | 468 | |
| 469 | 469 | if(!$subscr_gateway && !$subscr_id && !$subscr_cid && $last_auto_eot_time // EOTd? |
| 470 | - && (!user_can($user->ID, 'access_s2member_level1') || c_ws_plugin__s2member_user_access::user_access_role($user) === $demotion_role) | |
| 470 | + //260916.1840 A preserved unrelated role may sort before the destination role, so inspect all assigned roles instead of only s2Member's historical first-role result. | |
| 471 | + && (!user_can($user->ID, 'access_s2member_level1') || in_array($demotion_role, (array)$user->roles, TRUE)) | |
| 471 | 472 | && !c_ws_plugin__s2member_user_access::user_access_ccaps($user) // And no CCAPs either? |
| 472 | 473 | ) return array('type' => 'fixed', 'time' => $last_auto_eot_time, 'tense' => $last_auto_eot_time <= $now ? 'past' : 'future', |
| 473 | - 'debug' => 'This is an archived/fixed EOT time recorded by s2Member; i.e., the date this customer\'s access expired.'); | |
| 474 | + 'debug' => 'This is an archived/fixed EOT time recorded by s2Member; i.e., the date this customer\'s membership EOT was processed.'); | |
| 474 | 475 | |
| 475 | 476 | if(!$subscr_gateway || !$subscr_id || !is_array($ipn_signup_vars) || !$ipn_signup_vars) |
| 476 | 477 | return array_merge($empty_response, array('debug' => 'This user has no subscription; i.e., missing `subscr_id`, `subscr_gateway` or `ipn_signup_vars`.')); |
| 477 | 478 | |