1 comment

  1. I am not sure there is a canonical answer to this question but there is a login_redirect hook which, from the Codex, is explicitly “to change the location redirected to after logging in.”

    But I offer that with caution.

    I don’t know what the s2Member plugin is doing or why it is doing whatever it is on the wp_signon hook, per your description (I haven’t looked). That might be the only way to do whatever the plugin needs to do.

    And of course, that will interfere with other plugins. Sometimes plugins just conflict. That is probably unavoidable.

    I can imagine circumstances where you would want to kill everything– access/security related circumstances– but as I said without knowing exactly what the plugin is doing I can’t comment on whether (I think) it is “doing it right” or not.

    And looking into the wp_login hook, I notice that it is an action. An action is the kind of hook to use to do this sort of thing. There would be more of a case for “doing it wrong” if the hook were a filter, which should reasonably be expected to return data. Actions just “do stuff”. They are a way to insert, reorganize, whatever.

Comments are closed.