Info
- 2 posts
- 1 voice
- Started 1 year ago by aion4217
- Latest reply from ELundby45
- This topic is not resolved
Update $wp_users_object after creating a new user.
-
- Posted 1 year ago #
Hello,
I have tried searching for this, but I am having no luck. Any insight would be greatly appreciated.
So I am currently creating a new user by:
$new_id = bb_new_user( $user_name, $user_email, '', 0);
I have verified that the user is properly being created and '$new_id' contains the right user ID.
However, when I attempt to retrieve the user by:
$user = $wp_users_object->get_user($new_id);
Nothing is returned and $user is set to 0.
I have tried several other methods of retrieving the user and am having the same effect. Including:
$user = $wp_users_object->get_user( $user_name, array( 'by' => 'login' ) );
$user = $wp_users_object->get_user( $user_email, array( 'by' => 'email' ) );Any suggestions? Thank you in advance.
-
- Posted 1 year ago #
I have tried to accomplish this about 60 different ways. As of now I am assuming this is something wrong with BBPress, unless someone can shed some light on what i'm doing wrong.
I will have to switch to using a different forum if this cannot be resolved.
Why wouldn't this work?
$new_id = bb_new_user( $user_name, $user_email, '', 0);
$user = bb_get_user($new_id);I receive "user does not exist" when trying to login. However if I try again, I am able to login.
PS. Why does it say this thread was started by someone else (aion4217)?
-
You must log in to post.