Redirect After Login based on Membership Level

Discussion in 'aMember Pro v.4' started by tlever, Jul 24, 2012.

  1. tlever

    tlever New Member

    Joined:
    Apr 23, 2012
    Messages:
    10
    I'm sure there is a simple way to do this as it is really basic functionality for a membership system, but I'm not finding it at all.

    I need to be able to redirect the user to a specific page after login based on their product/membership level. Free Membership users get directed to one page while Premium Paid Memberships get directed to another page.

    There seems to be only a single option for this in the SettingsConfig/Login Page settings and no ability to redirect based on membership.

    Any help is greatly appreciated.
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    admin / setup / login page / Redirect after login, set to 1st available link.
    Then in protect content, create a link to the area you want to send them too, along with the proper membership level for that link.

    David
  3. tlever

    tlever New Member

    Joined:
    Apr 23, 2012
    Messages:
    10
    Thanks for the response David. Based on my experiences, you're half right but leaving out a few crutial details. For those who want and need to know, this is what I've learned:

    In my situation, I have a free level membership and a premium paid membership. I need the customer to be redirected after login to two different locations depending on their membership level. Here is how I was able to finally make it work.

    1) On my server, I created a folder inside the amember directory called "loginFree" and another one called "loginPremium".

    2) Inside those folders I placed the pages that I needed the user redirected to. If you don't want to move your files into those locations, place simple redirecting pages (like simple php redirects) into those locations. But here is what I found to be the REAL key to all of this. Make certain that inside those directories, the first file you want them to be redirected to is named "index.html".

    The reason for this is that the only way this seems to work is by using Protected FOLDERS. Trying to use protected links doesn't seem to work, contrary to other posts in these forums indicating that is the way to do it. By making the file you want them redirected to the index.html of that directory, when they are redirected to that folder (see below) it will automatically pull up the index.html file. (For those that don't know, this is standard internet protocol. If a browser is directed to a folder/directory as opposed to a specific file name, it will automatically select any file named index.html within that directory/folder and pull that up in the browser.)

    3) I went into my amember Admin interface and selected the Protect Folders area. In there, I chose to protect each of those two directories I created. When protecting the loginFree directory, be sure to then associate that with the Free Membership product. Alternately, protect the loginPremium folder and then associate that protection with the Premium Membership product.

    4) Finally, go into the Config/Login area and select to redirect after login to 1st protected URL.

    The reality here is that the Config/Login Redirect option for redirecting after login should really have the option named "First available Protected FOLDER" as opposed to "First available Protected URL". It would make the situation much more self-explanatory to people trying to figure this all out. The only way I've been able to get it to work is using this protected folder and index.html method described above. Creating protected links and then redirecting doesn't work. That method just sends the customer to the Membership page and shows them those links associated with their membership level - it doesn't automatically redirect them to any of the links.

    I hope this helps out some other people like me who've been asking for a while for this solution. :)

    Best,
    Tim

Share This Page