Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a user? #14

Open
1th opened this issue Apr 20, 2018 · 3 comments
Open

How to create a user? #14

1th opened this issue Apr 20, 2018 · 3 comments

Comments

@1th
Copy link

1th commented Apr 20, 2018

image

@Fab1en
Copy link
Owner

Fab1en commented Apr 20, 2018

I don't understand your question. Could you please be a little bit more wordy ?
User creation is shown in the doc

// create a new user
$newuser = new \RocketChat\User('new_user_name', 'new_user_password', array(
	'nickname' => 'New user nickname',
	'email' => '[email protected]',
));
if( !$newuser->login(false) ) {
	// actually create the user if it does not exist yet
	$newuser->create();
}

@1th
Copy link
Author

1th commented Apr 21, 2018

// create a new user
$newuser = new \RocketChat\User('new_user_name', 'new_user_password', array(
	'nickname' => 'New user nickname',
	'email' => '[email protected]',
));
if( !$newuser->login(false) ) {
	// actually create the user if it does not exist yet
	$newuser->create();
}

return "Unauthorized"

@dkyiev
Copy link

dkyiev commented May 12, 2020

After 2 years and it's still the same.
The user is created, but returns the message "Unauthorized".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants