pipit_members_tag_expiry()
Get a member’s tag expiry date. Optionally return the time difference between “now” and the expiry date in minutes.
pipit_members_tag_expiry($tag, $return_diff=false, $memberID=0);
This can be useful when you want to limit some member interactions such as requesting a new email/phone verification message.
Parameters
Type | Description |
---|---|
String | Tag |
Boolean | Set to true to return the time difference between “now” and the expiry date in minutes. |
Int | Member ID. Leave out if you want to target the logged in member |
Return
Boolean
Usage
pipit_members_add_tag('phone-code-sent', '+5 minutes');
if(pipit_members_has_tag('phone-code-sent')) {
$expires_in = pipit_members_tag_expiry('phone-code-sent', true);
echo "You can request a new code in $expries_in minutes";
}