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

Cant create a user #15

Closed
damiandennis opened this issue Oct 5, 2013 · 6 comments
Closed

Cant create a user #15

damiandennis opened this issue Oct 5, 2013 · 6 comments

Comments

@damiandennis
Copy link

Hi,

I run this command

$client->api('users')->create('[email protected]','test',array('name'=>'name','username'=>'username'));

I get an error like follows:
PHP Fatal error: Uncaught exception 'Gitlab\Exception\ErrorException' with message '400 (Bad request) "email" not given' in /home/damian/public_html/vendor/m4tthumphrey/php-gitlab-api/lib/Gitlab/HttpClient/Listener/ErrorListener.php:47

Not sure if this is a bug or something wrong with my setup?

Cheers

@m4tthumphrey
Copy link
Contributor

Which version of GitLab are you running 6.2?

@damiandennis
Copy link
Author

running GitLab version 6.0

@damiandennis
Copy link
Author

This is what I add to composer is this correct?

"m4tthumphrey/php-gitlab-api": "6.0.*"

@damiandennis
Copy link
Author

ok I know what the issue is, I was posting to a non-secure page and my gitlab setup has a secure certificate so it was getting redirected.

@m4tthumphrey
Copy link
Contributor

Cool so theres no issue?

@damiandennis
Copy link
Author

Yeah still getting an issue but Its not with your code, seems to be a bug in gitlab with creating users in the api. I cant create a user, just get a 404 not found returned and the email/username does not exist yet.

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

No branches or pull requests

2 participants