admin管理员组文章数量:1296847
I'm a bit lost on this one and would appreciate some direction. I have created a plugin that sends a message to a user after they successfully sign up. However, I would like this message to be sent 24 hours after the event is triggered (their account verification).
Thanks!
I'm a bit lost on this one and would appreciate some direction. I have created a plugin that sends a message to a user after they successfully sign up. However, I would like this message to be sent 24 hours after the event is triggered (their account verification).
Thanks!
Share Improve this question asked Apr 1, 2021 at 7:13 DazzaDazza 234 bronze badges1 Answer
Reset to default 0In below function take the registration date of the user and add 24 hours to the registration date. If current time matches the $notify time then send message.
$notify = date("Y-m-d H:i:s",strtotime("+24 hours",strtotime($registration_date)));
if(date("Y-m-d H:i:s")==$notify){
//send message code
}
本文标签: Run PHP 24hrs After Event Trigger
版权声明:本文标题:Run PHP 24hrs After Event Trigger 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741642780a2390013.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论