WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 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.

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

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.