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

Search Results for 'swpm_after_login'

Simple Membership Plugin › Forums › Search › Search Results for 'swpm_after_login'

Viewing 4 results - 16 through 19 (of 19 total)
← 1 2
  • Author
    Search Results
  • February 14, 2018 at 8:31 pm #13358
    [Resolved]

    Topic: SMP redirects me to profile page instead of a setup page after password update

    in forum Simple Membership Plugin
    id2010
    Participant

    I have a custom redirection for a certain user group after login. It works fine except after password reset/update. It doesn’t matter I do, SMP always redirects me to a profile page instead of the page previously set up after password reset/update.

    I would like to know if that would be a feature that comes with the plugin and if I could change that behavior.

    Thanks.

    P.S.

    It seems the swpm_after_login action isn’t executed even adding a higher priority ( Lowest Number ) after password reset/update.

    February 8, 2018 at 12:21 am #13259
    [Resolved]

    Topic: Logout Link Not working

    in forum Simple Membership Plugin
    gphsupport
    Participant

    I have used the suggested method ( https://simple-membership-plugin.com/creating-member-logout-link/ ) and have a login link on my site ( https://www.stiraallternatives.com/aviate/ ) but it’s not working.

    The site is in a subfolder (which i seen noted on other threads/tickets; although none of the threads list any solution). And I see one cookie (swpm_session) is on Path: / while all others (swpm_in_use, simple_wp_membership…, wordpress_sec…, wordpress_logged_in…) are all on Path: /aviate/.

    Clicking ‘Logout’ does the redirection, but doesn’t clear any cookies.

    Ironically, I have this same setup on another server and it works fine.

    Logs aren’t helpful:

    log.txt
    [02/07/2018 3:51 PM] – SUCCESS: After login redirection addon. Checking if member need to be redirected.
    [02/07/2018 3:55 PM] – SUCCESS: After login redirection addon. Checking if member need to be redirected.
    [02/07/2018 4:04 PM] – SUCCESS: After login redirection addon. Checking if member need to be redirected.
    [02/07/2018 4:04 PM] – SUCCESS: After login redirection addon. Checking if member need to be redirected.
    log-auth.txt
    [02/07/2018 3:51 PM] – SUCCESS: Authentication request – Username: financial-pro
    [02/07/2018 3:51 PM] – SUCCESS: Authentication successful for username: financial-pro. Executing swpm_login action hook.
    [02/07/2018 3:51 PM] – SUCCESS: Trying wp_signon() with username: financial-pro
    [02/07/2018 3:51 PM] – SUCCESS: Setting current WP user to: financial-pro
    [02/07/2018 3:51 PM] – SUCCESS: Triggering swpm_after_login hook.
    [02/07/2018 3:55 PM] – SUCCESS: Authentication request – Username: financial-pro
    [02/07/2018 3:55 PM] – SUCCESS: Authentication successful for username: financial-pro. Executing swpm_login action hook.
    [02/07/2018 3:55 PM] – SUCCESS: Trying wp_signon() with username: financial-pro
    [02/07/2018 3:55 PM] – SUCCESS: Setting current WP user to: financial-pro
    [02/07/2018 3:55 PM] – SUCCESS: Triggering swpm_after_login hook.
    [02/07/2018 4:03 PM] – SUCCESS: login
    [02/07/2018 4:03 PM] – SUCCESS: Authentication request – Username: AviateAdmin
    [02/07/2018 4:04 PM] – SUCCESS: Authentication request – Username: financial-pro
    [02/07/2018 4:04 PM] – SUCCESS: Authentication successful for username: financial-pro. Executing swpm_login action hook.
    [02/07/2018 4:04 PM] – SUCCESS: Trying wp_signon() with username: financial-pro
    [02/07/2018 4:04 PM] – SUCCESS: Setting current WP user to: financial-pro
    [02/07/2018 4:04 PM] – SUCCESS: Triggering swpm_after_login hook.
    [02/07/2018 4:04 PM] – SUCCESS: Authentication request – Username: financial-pro
    [02/07/2018 4:04 PM] – SUCCESS: Authentication successful for username: financial-pro. Executing swpm_login action hook.
    [02/07/2018 4:04 PM] – SUCCESS: Trying wp_signon() with username: financial-pro
    [02/07/2018 4:04 PM] – SUCCESS: Setting current WP user to: financial-pro
    [02/07/2018 4:04 PM] – SUCCESS: Triggering swpm_after_login hook.
    [02/07/2018 4:05 PM] – SUCCESS: Authentication request – Username: financial-pro
    [02/07/2018 4:05 PM] – SUCCESS: Authentication successful for username: financial-pro. Executing swpm_login action hook.
    [02/07/2018 4:05 PM] – SUCCESS: static function swpm_login(). User is logged in. WP Username: financial-pro

    Any ideas?

    February 20, 2017 at 3:16 pm #10215

    Topic: Custom redirect after login

    in forum Simple Membership Plugin
    carcangium
    Participant

    I am trying to redirect the user after it logs in.

    I run set_redirect() at the top of my header.php

    /*
    * ===============================
    * SET SESSION REDIRECT
    * ===============================
    */

    function set_redirect(){
    if(isset($_GET[‘redirect’]) ){
    $redirect_link = htmlspecialchars($_GET[‘redirect’]);
    session_start();
    $_SESSION[“redirect”] = $redirect_link;
    }
    }

    And this is my hook in function.php

    /*
    * ===============================
    * AFTER LOGIN REDIRECTION
    * ===============================
    */

    add_action(‘swpm_after_login’, ‘swpm_do_after_login_redirection’);

    function swpm_do_after_login_redirection()
    {
    if(strpos($_SESSION[‘redirect’],’supplier’) > 0 || strpos($_SESSION[‘redirect’],’airport’) > 0 || strpos($_SESSION[‘redirect’],’operator’) > 0 || strpos($_SESSION[‘redirect’],’job’) > 0 ){
    //session_start();
    wp_redirect($_SESSION[‘redirect’]);
    exit;
    }else{
    $member_profile_url = get_permalink(124);
    wp_redirect($member_profile_url);
    exit;
    }

    }

    What am I doing wrong?

    May 1, 2016 at 11:56 pm #6796

    In reply to: Redirect Code

    Myroslav
    Participant

    For guys who still have the same problem.

    This works for me:
    “>My Profile
    I put this into my widget but for that you should enable the opportunity to use php code in your widget area. Here’s the explanation : http://www.emanueleferonato.com/2011/04/11/executing-php-inside-a-wordpress-widget-without-any-plugin/

    Also you should follow the update documentation as in previous version the function was “swpm_after_login_url” and not “swpm_alr_after_login_url”.

    Hope this help anyone.

  • Author
    Search Results
Viewing 4 results - 16 through 19 (of 19 total)
← 1 2
« Previous Page

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