Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have integrated buddypress in my wordpress theme. i need to get user id when buddypress completes user registration successfully like what we usually do wp_insert_user( $userdata ) which returns user id when user information is successfully inserted..so how do i get user id?

its urgent..pleas help.

Thanks in advance.

share|improve this question

closed as off-topic by Wyck, Johannes Pille, toscho Aug 16 at 1:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

if you put this action you will get the new user_id that wordpress provide when new user register

add_action("bp_core_activated_user","bp_autologin_on_activation",40,3);
function bp_autologin_on_activation($user_id,$key,$user) {

...

}

I hope help

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.