Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

Add class ou var for expired account, or change role

Simple Membership Plugin › Forums › Simple Membership Plugin › Add class ou var for expired account, or change role

  • This topic has 6 replies, 2 voices, and was last updated 8 years, 10 months ago by mbrsolution.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • November 17, 2017 at 6:25 pm #12494
    Lescrocs
    Participant

    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

    November 18, 2017 at 6:15 am #12503
    mbrsolution
    Moderator

    Hi, can you please provide more information. I am not really following what you mean?

    Thank you

    November 18, 2017 at 11:21 am #12505
    Lescrocs
    Participant

    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

    November 18, 2017 at 11:24 am #12506
    Lescrocs
    Participant

    Or only remove role “adherant” when account is expired?? or add another for expired?

    November 18, 2017 at 8:59 pm #12511
    mbrsolution
    Moderator

    Hi, please have a look through the following documentation. Let me know if this helps you.

    Regards

    November 19, 2017 at 12:48 pm #12520
    Lescrocs
    Participant

    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

    November 19, 2017 at 9:18 pm #12522
    mbrsolution
    Moderator

    I am glad to see that you have found a solution to your issue.

    Enjoy the plugin 🙂

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy