expired memberships

Is there a way to have an expired membership not go into their account area until they renew it? As it sits now, all expired memberships have access to their account area. I totally don't want that, they should have to renew their membership first; as I have account links to other stuff I prefer not to allow them to use without renewing their membership. I don't want their account to be deleted; as they will have to renew it, and that's a lot of work for them. Is there perhaps another membership plugin that works well with Premiumpress Themes? Setting to pending doesn't change things, no matter what I do, they get to access their expired account. Brenda

Created: March 14, 2016 at 4:50 pm
  • In: Dating Theme
  • Started by: BrendaBrenda
  • 5 members left 30 comments
  • Last reply from: JamesDJamesD

  • JamesD
    March 22, 2019 at 8:43 am

    Even better news… here’s a tweaked version that displays the proper message depending if the user has an active membership or normal login error message. There are a variety of ways to do this, but I believe this is more what you’re looking for.
    Note: This will display the Restricted Access Text message set under Theme Setup > Listing Setup > Membershp Packages > Extra Settings > Restricted Access Text. You should be able to use HTML in that setting as well. You may not even need the file.

    I’ve attached an updated file with the code changes or you can copy/paste below and replace the previous code in the file.
    * Restrict login if no active membership
    * Fired by authenticate action hook.
    * @access public
    * @param WP_Object $user
    * @param string $username
    * @param string $password
    * @return object (either WP_Object or WP_Error)
    add_filter( 'authenticate', 'check_active_account', 30, 3);
    function check_active_account($user, $username, $password) {
    global $GLOBALS;

    // Checks for the first user record (admin)
    if( 1 === $user->ID ) { return $user; }

    // Checks if user has a membership
    $membershp = get_user_meta($user->ID, 'wlt_membership',true);

    // Checks for expired membership date
    $expires = get_user_meta($user->ID, 'wlt_membership_expires',true);

    // Checks if user has a valid or expired membership
    $not_active = ( strtotime($expires) <= strtotime(date("Y-m-d H:i:s")) )?true:false;

    // Set message depending if normal login message or custom message when no membership or expired.
    $msg = (is_wp_error( $user ))?$user->get_error_message():stripslashes($GLOBALS['CORE_THEME']['membership_restrictedtext']);

    // If user does not have an active membership we display the error message, otherwise pass the user object back for valid login
    return (true === $not_active)?new WP_Error( 'broke', $msg ):$user;

    You must be a member to view attached files.
  • Anthony
    March 22, 2019 at 7:25 pm

    You are kind brother. See guess we are amazed today that we are the only user of the MJ and DT themes charging for yearly memberships. Now find out the member is not forced to be renew upon expiration?

    In other words it seems we are told the theme only offers the ability to have the member renew in good faith with a passive renew now button and ONLY if they decide to ethically.

    Also when the yearly membership expires the members account is still active and the admin is not even notified via an email or any method of this expiration.

    Thus a user signs-up, and at the end of the year does not have to renew their membership and the admin never knows it expired. Either I’m drinking too much bourbon or this is the strangest thing ever as ALL site models offering memberships require renewal of memberships to remain active.

    However after 2 years we only now discover this is the case with the MJ and DT? or are we totally lost here as even mark the coder is telling us this is how it works. Therefore not sure what to do as who would use a theme that does not force renewal of memberships after the first year or time frame paid for as a member?

    We would have never build our community around such a theme.

  • Anthony
    March 22, 2019 at 7:36 pm

    Just saw this reply before writing the above….thank you again. So placing this in the child theme folder will force a check if the membership is expired but will it require them to renew their membership? if so then how if they can not access their account?

    I think herein is the issue at hand and why the theme is set-up to allow access to their account even if expired. Zarko had fixed it a year ago so when the user logged in, then moved their browser it would launch a pop-up window requiri8ng paypal payment to renew their account. Somehow that no longer is the case thus the start of this issue on the forum for us.

    Before we add this file to the MJ-child folder can you share a little more about the method this will resolve other than deny them access to their account?

    Your efforts are greatly appreciated by myself and surely others whom are having the same issue like the forum user whom started this thread using the dating theme. Thank you again.

    PS…. as you know we resolved with your help the message stating the user must reg or login to purchase services so we are ONLY working now on the membership expiration issue at this time. thinking the file you shared address’s that issue correct?

  • Anthony
    March 22, 2019 at 7:50 pm

    PS…to the above is this still relevant to us being we are using MJ there is NO file in our MJ-child theme folder / directory.

  • JamesD
    March 22, 2019 at 9:43 pm


    So placing this in the child theme folder will force a check if the membership is expired but will it require them to renew their membership?
    It does the check, but it’s up to you to to determine what and how to handle the access denial. You could put a link within the message settings (mentioned in previous post) to send them to a page to do it, you could make other changes to redirect them if you want… there are many ways and things that can be done, but it’s ultimately up to you. Most of the “heavy lifting” (coding) has been done with this.

    … thinking the file you shared address’s that issue correct?
    Yes, you are correct.

    Before we add this file to the MJ-child folder can you share a little more about the method this will resolve other than deny them access to their account?
    Mainly displays the Restricted Access Text message if there isn’t an active membership or expired membership. I cannot account for all potential scenarios, but this would be the core portion to build off of if more options/variations are needed.

    PS…to the above is this still relevant to us being we are using MJ there is NO file in our MJ-child theme folder / directory.
    As I stated before, if the file doesn’t already exist in the child theme directory then upload one I’ve previously attached.

    The file goes in the child theme directory. Depending on the child theme being used can vary the folder location. It’s the ACTIVE child theme directory. There’s only one active child theme.

  • Anthony
    March 22, 2019 at 10:57 pm

    Thank you again James. Your filed works to keep them from logging in after we tested it but we can not deny the user access to their account due to the fact it merely denies them access completely. Likely the idea.

    YET it does not allow them to renew their membership. Even if we write text in the Restricted Access text area we know about, we still obviously do not have a way of redirecting them to a renewal page which then recognizes they already have an account and then credits a “renewal memberships” to their current membership account and then reactivates the account from the new renewal date too.

    Gonna have to wait to see if Mark will fix this for us as it works fine on our Cartoon Actors site which is a DT theme similar to this MJ theme we use at United Voice Talent. (the one we are working on with your help) Mark replied today via a ticket he would help fix the issue but we are very concerned this will happen as it has been 2 weeks already and we have been told the site does NOT work that way even though it has before and DOES using the DT theme at our sister site.

    as shared peeps login and if they are expired and have ignored emails of expiration it prompts the member to renew with a PayPal pop-up window that spawns after login. Stopped doing so on the MJ theme months ago thus the issue at hand.

    Your help with the <h4> text message has been very much a blessing. Guess the 2nd issue our expired member renewal matter is a whole other beast! :–)

  • JamesD
    March 22, 2019 at 11:15 pm

    It’s setup to help make determinations and not totally complete to fit specific requirements other than check for expiry date and valid account. That’s up to the site owner to add the additional function. If Mark is unable to help and you need more functionality/checks then I’d recommend hiring a developer to assist with the final results you’re looking for.

    I’ve tried to help simplify a lot of what’s needed and try to avoid needing to pay for a coder, but someone on your team would need to have a bit more dev knowledge to continue with it or another coder would be needed.

    Good luck.

  • Anthony
    March 23, 2019 at 12:17 am

    You are right thank you for being so awesome. It is people like you that are the biggest help out there. You are a good man. We do get that we need to find an affordable “coder” and no we are not advanced enough to handle custom stuff. We knw enough to do basic stuff and even basic cut and paste, patches, etc.

    Truth is we have NOT found anyone affordable who can handle php / etc that will work on PP themes. In the past we reached out to a few from coders and fiverr and almost everyone could not or would not work with PP themes staying they are to complicated and touchy to figure out. lol

    So we are stuck with two sites that have issues like workflow problems, renewal of membership problems, using additional registration pages based on the user sign-up, ( client or talent) dashboard areas not good for both sets of users, etc. Thus the site works overall but does have limitations.

    Thank you again for your support and surely everyone on the forum benefits from your expertise.

  • JamesD
    March 23, 2019 at 12:57 am

    You’re welcome Anthony.

  • JamesD
    March 23, 2019 at 2:04 am

    While I currently have the time I’d be happy to review a detailed workflow expectation and flowchart with the minimum specs required. Viewing the scope of everything would give me a better idea on the overall structure, expectation and how involved it could be and potentially put a plugin together to handle most/all of your concerns. The more detailed the better. If this would be needed to work with multiple v8 PP themes (like DT & MJ) and a particular theme requires different scenarios/actions to be handled, then be sure to include those as well. ( MJ would have “clients” and “talent” scenarios/options while DT would not offer the same scenarios since it doesn’t have “clients” and “talent” users).

    Set aside the thought of needing to code anything for the moment and think about…
    As site admin, what would you envision you’d see on a settings page if you needed to set up a specific “denial” scenario? ( display a message, display a HTML message with possibly links or buttons, automatically redirect to a specific page depending on the membership level, specific experience depending on the type of user either “client” or “talent”… etc)
    What would be all the options, bells-whistles and simplicity you’d expect as a non-coder to complete such a task?
    What would be all of the “ideal” scenarios you’d like to account for?
    As one of your users, what type of experience would you envision for them?
    Would the experience be any different if they were a “client” or are “talent”? How?

    There are so many different scenarios and actions that can be handled when covering something like this. but (at a minimum) the only ones that really matter would be the ones required from the site admin.

    The main objective would be to make things as hands-free as possible for site admin, but offer all the required needs.

    Info can be sent to customphix[@]

  • Charles
    March 23, 2019 at 1:04 pm

    Being around the forums for more a few years I have to say that these days seems that all PP forums are just quiet. Not much buzz as 5-6 years ago.
    You are doing a super effort to solve this issue.
    We sincerely appreciate your time (hours or days, not minutes) and efforts, and hope you continue helping people with your knowledge. Awesome! Thank you!

  • JamesD
    March 23, 2019 at 11:19 pm

    Hi Charles,
    Thank you, I do what I can.

    Not much buzz as 5-6 years ago.
    I agree, it saddens me.

    (IMHO) The forum kinda feels more like a general support desk now a days than a lively community helping one another, collaborating or just general communication with each other. Not holding my breath, but maybe one day things will change and pick back up.

  • Anthony
    March 29, 2019 at 12:02 am

    James you are a good man. I just saw this. mark did fix the renewal issue and so far it is working for us thankfully. Now ehen a user logsin and their membership is expired ti spawns a paypal window forcing the user to renew as it should be. Thank you Mark.

    However your offer to create a plugin is something I’m (and many 8X users should be) interested in using the MJ theme.

    What we’d / I’d like to see is the ability to offer a registration page for the purchaser / client user and another for service offering users. I really do not understand why the MJ theme was never set-up that way anyways. Why would anyone want to have the service providers “dashboard” be the same as the “purchasers” or client dashboard? Even the service listing section are in that dashboard and the client does not even need a listing as we do not allow it on our site. Then service offering users would spam the hell out of the “purchasers listings” and profiles. Just makes no sense.

    Not to mention why would we want to use the same registration form to collect the same information on both users? So a perfect beginner dream would be to have 2 registration forms, 2 login buttons on login page pages (1 buyer / 1 service provider) each directing the user to their relevant dashboard after login.

    Then have the dashboard sections be only those desired for the user’s purpose. However likely this is not possible as the theme is probably way to difficult to do this without a complete script redesign. Could a plugin handle all of that? Anyways thank you for sharing with us forum users. :–)

    Truth is after 2 years building around this MJ theme we would have never used it and went with the DT as we do our other site. The idea of letting the buyer and seller work together was attractive but it just did pan out as the theme is not friendly in such a manner for the above not to mention the issues with the work-flow which never works right. Thanks again James.

  • JamesD
    March 31, 2019 at 12:44 am

    Hello Anthony,
    Thank you.
    So a perfect beginner dream would be to have 2 registration forms, 2 login buttons on login page pages (1 buyer / 1 service provider) each directing the user to their relevant dashboard after login.
    I’ve taken a peek, yes, it can get in-depth, but other required specifics you may need can also determine how deep. Difficult to say, the request is pretty general.

    Let me ask this… Are you expecting to require users to either be a “seller” or “buyer and have separate exclusive accounts based on that?

    Meaning, if a “seller” decided they wanted to be a “buyer”, they would require to open a new account as a “buyer”. This method doesn’t really seem logical IF users can be both and require two accounts (IMHO).

    I can take a closer look after your response.

Viewing 15 posts - 16 through 30 (of 31 total)