Hi all.
I searched in the community forum, but all the code found seems to be like mine...
I want to send an email to the user just 30 days before their profiles expire.
My workflow consider expiration time based on last visit date. So my users simply must log-in before lastVisitTime + 365 days to mantain their profiles activated.
I want to send an email 30 days before the expiration.
So
1. New scheduled;
2. Connection on previously imported user table;
3. Email plugin.
Mi php condition (for the moment in just +1 day to comfortly test the code):
Tried using cron execution tool... and the results returned are always false.
I expect it to be true for at least three of my users (logged yesterday as checked on the DB).
I'm sure my code is good...
I'm just not sure about the dates collected at the beginning
$ultimavisita = $row->dz8v4_users___lastvisitDate
How can I print my viariables in condition field?
Any idea about what is wrong in my code?
Thanks in advance.
Valerio
I searched in the community forum, but all the code found seems to be like mine...
I want to send an email to the user just 30 days before their profiles expire.
My workflow consider expiration time based on last visit date. So my users simply must log-in before lastVisitTime + 365 days to mantain their profiles activated.
I want to send an email 30 days before the expiration.
So
1. New scheduled;
2. Connection on previously imported user table;
3. Email plugin.
Mi php condition (for the moment in just +1 day to comfortly test the code):
PHP:
$ultimavisita = $row->dz8v4_users___lastvisitDate;
$checkdate = date('Y-m-d');
$ultimavisita = strtotime($ultimavisita);
$checkdate = strtotime($checkdate);
$ultimavisita = date('Y-m-d', $ultimavisita);
$checkdate = date('Y-m-d', $checkdate);
$ultimavisita = date('Y-m-d', strtotime($ultimavisita . " + 1 days"));
//in production must be +335 days
return $ultimavisita == $checkdate;
Tried using cron execution tool... and the results returned are always false.
I expect it to be true for at least three of my users (logged yesterday as checked on the DB).
I'm sure my code is good...
I'm just not sure about the dates collected at the beginning
$ultimavisita = $row->dz8v4_users___lastvisitDate
How can I print my viariables in condition field?
Any idea about what is wrong in my code?
Thanks in advance.
Valerio