pipit_members_has_tag()
Check whether a member has a tag.
pipit_members_has_tag($tag, $id_or_email=0);
This function queries the database. Whereas perch_member_has_tag() checks the session data which may not be up to date (e.g. admin added/removed a tag via control panel while the member is already logged in).
Parameters
Type | Description |
---|---|
String | Tag |
int/String | Member ID or email address. Leave out or set to 0 to target the logged in member. |
Return
Boolean
Usage
if( !pipit_members_has_tag('email-verified') ) {
perch_template('util/notification.html', [
'type' => 'warning',
'message' => 'Your email address ' . perch_member_get('email') . ' is not verified.',
]);
}