Amember sidebar plugin/widget for Wordpress

Discussion in 'Integration' started by skippybosco, Mar 19, 2008.

  1. campitelli

    campitelli New Member

    Joined:
    Mar 17, 2009
    Messages:
    16
    I am using wpamember plugin/sidebar widget with WP 2.9.1. When I log in using the widget I just get rerouted to the standard amember log in page instead of the /member.php page.

    If I log in on page and go back to WP, the widget has benn updated with the correct info (name and products that I have access to). Does anyone know why this may be happening?
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    if you are getting directed to the login page that would suggest 1 of 3 things maybe:

    1) your session.save_path value is incorrect or read only
    2) your product url for the product the user is subscribed to is set to the login page
    3) your logging in with the wrong user id and password
  3. campitelli

    campitelli New Member

    Joined:
    Mar 17, 2009
    Messages:
    16
    I know I have 2) & 3) correct but am not sure where I would go to know:

    >1) your session.save_path value is incorrect or read only

    what file do I need to look in and how would I know if it set incorrectly?
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    log in to your aMember admin and click on version info.. look for session.save_path. make sure the value is present, that the path exists on your server and is writable by the web account.
  5. campitelli

    campitelli New Member

    Joined:
    Mar 17, 2009
    Messages:
    16
    thanks a ton. that path did not exist on my server - creating it fixed it - much appreciated.
  6. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    glad to hear it!
  7. 0wazza0

    0wazza0 Member

    Joined:
    May 31, 2009
    Messages:
    31
    ma-amember widget Logout button goes to wrong front page

    We have been using the ma-amember widget successfully for a few months but have run into a recent problem with the Logout button. After adding a third Wordpress page to our site along with a new ma-amember widget for that page, I can log in successfully to the new page but when I logout, I get taken to another (wrong) front page on the site.

    The link that the ma-amember Logout button on the new page points to is: http://www.mm4projects.com/amember/logout.php which ends up taking me to http://www.mm4projects.com/english/ (which is wrong).
    The front page that I want to the Logout button to take me to is:

    http://www.mm4projects.com/businessinnovation/

    It looks to be "just" (I hate that word when it comes to code) a matter of entering a redirect line in the ma-amember code but when I try my code (I am not a coder), although I can save the edited widget, I still end up at the /english page.

    The red code below is what I tried but it does not work, so I must be making some sort of syntax error or I am working in entirely the wrong part of the ma-amember widget code! Can someone explain (Help Skippy pretty please) to me exactly where and what line I need to add as the redirect so that Logout goes to http://www.mm4projects.com/businessinnovation/

    Start part of ma-amember widget CODE
    .......
    $registerurl = get_bloginfo('url').'/wp-login.php?action=register';

    $content = str_replace($registerurl, $amember_widget_landing, $content);

    $profileurl = get_bloginfo('url').'/wp-admin/profile.php';

    $content = str_replace($profileurl, $amember_widget_url.'profile.php', $content);

    $logouturl = get_bloginfo('url').'/wp-login.php?action=logout';

    $content = str_replace($logouturl, $amember_widget_url.'logout.php?amember_redirect_url=http://www.mm4projects.com/businessinnovation/', $content);

    $loginurl = get_bloginfo('url').'/wp-login.php';

    $content = str_replace($loginurl, $amember_widget_url.'login.php?amember_redirect_url='.$_SERVER['REQUEST_URI'], $content);



    $content = str_replace('%member%','<a href="'.$amember_widget_url.'member.php">Members Page</a>', $content);



    return $content;

    }


    End CODE
  8. 0wazza0

    0wazza0 Member

    Joined:
    May 31, 2009
    Messages:
    31
    As is often the case, a good night's sleep came up with the answer. I use amProtect on this new page and had forgotten to set Remember login in the amember PHP Include setting. Sorry.
    However, it would still be nice to know how to write a redirect line for the ma-amember widget so that the logout redirect works from there.
    Skippy?
  9. tommyk

    tommyk New Member

    Joined:
    Feb 7, 2010
    Messages:
    15
    Great news. [​IMG]
  10. insidenetwork_admin

    insidenetwork_admin New Member

    Joined:
    Mar 12, 2010
    Messages:
    15
    Hi guys,

    We've just installed and activated the plugin and it looks great! However, logout is not going to the right URL. Is that configurable by editing the plugin code itself? I did a quick search for the URL it IS going to, and didn't find it in there.

    I am not a coder, so I am somewhat confined to the guess-and-check method. Your insights are appreciated!

    Susan
  11. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Logout URL: amember admin / setup / php_include
    Redirect after logout

    David
  12. andy_glo

    andy_glo Member

    Joined:
    Aug 29, 2006
    Messages:
    51
    Thank you so much for sharing this Skippy. Works fine for me and I even added a not registered yet link to the widget.
  13. rdpioneer

    rdpioneer New Member

    Joined:
    Apr 1, 2010
    Messages:
    27
    Hi, my amember widget isn't working.. when i log in with a payed user i created, the widget doesn't show me the payed user menu (my membership page, my profile, logout) it stays the same.. as if i never logged in (however i can see the suscribers content)!
    Do you have any idea of what is causing this problem?
    thank you very much!
  14. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Please contact us in helpdesk we will check what can be wrong.
  15. jccbroker

    jccbroker New Member

    Joined:
    Mar 16, 2010
    Messages:
    11
    The plugin works great, including the CSS, with the exception of one edit that I cannot seem to figure out:

    The redirect upon logging in takes the user to: $amemberdir/login.php instead of simply $amemberdir/.

    The difference is instead of successfully logging in and finding a desired landing page - a content page, the member profile, etc. (Could I enter an explicit 'myaMemberdir/protectedmemberURLdir/' in the code below?) - a successful log in takes a member to the generic aMember login.php screen.

    The member is asked to "login" or "register" (which makes no sense obviously) and with one additional click of the "login" link, they are taken to my desired landing page/URL.

    EDIT: In an earlier post I read that the redirect is not controlled in the widget. That solves that. I'll quote the post and redirect my question.
  16. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This $amemberdir/login.php already should redirect user to aMember CP -> manage products -> Edit Product -> Product URL already .
    You can also add this input to login form to hardcode redirect after login:
    <input type=hidden name=amember_redirect_url value='/protectedarea/'>
  17. jccbroker

    jccbroker New Member

    Joined:
    Mar 16, 2010
    Messages:
    11
    Unfortunately, I tried that option (my URL was disregarded) - I saw a blank /member/login.php altogether and no redirect took place at all.

    Any help is greatly appreciated!
  18. dezco

    dezco New Member

    Joined:
    Apr 5, 2007
    Messages:
    11
    I am using your plugin and I've noticed that if you stay logged in and get a list of subscriptions that are available to you if a subscription expires while you are logged in the list does not get updated even if you refresh the page. What this means is that someone could have access to content for as long as they stay logged in.

    Is this correct or do I have some settings that are wrong (which is entirely possible).
  19. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Just because the links are there does not mean the user has access to the content.

Share This Page