We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

member_member_register and member_id

Development and Programming

DEA's avatar
DEA
257 posts
16 years ago
DEA's avatar DEA

Question: at what point is $SESS->userdata[‘member_id’] available? Is it set and ready for use when using the member_member_register hook?

       
Robert Wallis's avatar
Robert Wallis
36 posts
16 years ago
Robert Wallis's avatar Robert Wallis

$SESS->userdata[‘member_id’] is set just a few lines after the hook. :(

However, a unique id is generated in $data[‘unique_id’] that is passed to the hook, so you could SQL query the member_id based on the unique_id.

SELECT member_id FROM exp_members WHERE unique_id=...

😊

       
DEA's avatar
DEA
257 posts
16 years ago
DEA's avatar DEA

Hi Robert, and apologies as I missed your response. Thanks very much for that, I’ll give this a shot!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.