- This topic has 6 replies, 2 voices, and was last updated 8 years, 10 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Add class ou var for expired account, or change role
Hello,
I need to make a conditional rule for not show expired account in my PHP page (loop of users, same directory, but with my ACF fields)
i make a conditional on role but when account is expired, the user have the stay with role.
i should anything like this
if ($role ==”adherant” && $active)
code…
anyone can help me?
TY
Hi, can you please provide more information. I am not really following what you mean?
Thank you
hi,
sorry for my language, i don’t speack english…
i make a directory page with users member of one role “adherant”. When new member is added, he become “adherant” user. and he have acces to any page and appear on directory page as member and i need to remove this user from this page if member don’t renew him account and become “expired” account.
my page is in PHP and check all user with “adherant” role. i need to find anything to include only active account in loop.
i try code for compare the email from user table and member_tbl table and check if account_state is “active” but this don’t work for moment…
Have you code for check if account is active (in php) i use “$curuser” and “$user->ID”
TY
Or only remove role “adherant” when account is expired?? or add another for expired?
Hi, please have a look through the following documentation. Let me know if this helps you.
Regards
Hi,
i have found my func with
$member_email = ‘test123@yahoo.com’;
$swpm_user = SwpmMemberUtils::get_user_by_email($member_email);
and change test123 by $user->email
and after i use $swpm_user->account_state for filter
Great thank you
Have good day
I am glad to see that you have found a solution to your issue.
Enjoy the plugin 🙂