- This topic has 1 reply, 2 voices, and was last updated 13 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › Setting Cookies at Member Login Time – eMember Login Action Hook
Hi,
When the user logs in I want to to set a cookie with some user unique identifier. This cookie is to be used as an identifier for an iframed ASP.NET application. (iframed app will be hosted on same domain so there is no no cross-domain scripting)
I’ve seen some examples (on http://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248) accessing the eMember $auth so I kinda have that figured out.
What I need is to know where I can hook in. I obviously only want to run this action once at login and not on every request. But since emember has it’s on db table and from what I have understood don’t use the wp_login hook, please tell me if and how I can do an add_action for this.
Preferably I would want to do this as a plugin so neither modified eMember or theme templates are responsible for setting the cookie.
Thank you in advance.
I have added a new action for this event so you can use the following in your plugin to get notified when someone logs into eMember:
do_action('eMember_login_complete','your_custom_function_name_to_handle_this_event');
Please get a new build of the plugin from here to get this new action hook: