As an administrator, I had a need to display the EOT for a member (i.e. not for/to a currently logged-in member). The s2member_auto_eot_time value is encoded so presenting it in a human-readable format became the challenge. I found the following code snippet quite useful:
- Code: Select all
$auto_eot_time = get_user_option ("s2member_auto_eot_time", $uid);
$auto_eot_time = ($auto_eot_time) ? date ("m-d-y", $auto_eot_time) : "";
echo $auto_eot_time;
You can output different formats for the date by referencing http://php.net/manual/en/function.date.php