Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Create user with API
yuga
New
Hi,
Is there any known way to create a new user using Vanilla API?
I use /users/edit calls successfully for already existent users, but need to add new ones as well. I've tried to use a couple of approaches suggested at this forum, but with no luck.
If it's impossible to implement with API, is there an easy and stable way to do it with direct writes to db? I basically only need to create a new user (Name + Email) with curtain role assigned, that's all. If it's possible, could you please provide more details - I'm a newbie at Vanilla.
Thank you,
Yuga
0
Comments
I was trying exactly the same yesterday! That's what I have done - but it didn't work :-(
I thought that this library would be helpful http://phphttpclient.com/
I get
as if I've sent nothing...
Btw. I wouldn't have asked that question here and I don't believe it will be answered. Giving a description means posting an introduction on how to write a spam bot ;-)
See that piece of faulty pseudo code below?
Some silly, drunken clown must have taken over my account and posted that. I deny that this was done by me!
Oh, what a shame :-(
Actually, I've found a work-around, based on some research and intuition
// example data
$sendData = array(
'Name' => 'Test',
'User.Email' => 'test@test.com',
'Email' => 'test@test.com',
'Role.ID'=>8, // Member
'Title'=>'',
);
function makeCurl($action, $sendData){
$url = 'https://yourDomain.vf.com/api/v1/users/' . $action . '.json?access_token=tokenItself';
$ch = curl_init($url);
}
function logError($message){
file_put_contents('error.log', $message, FILE_APPEND);
}
If you post under an addon then it will be linked to that addon, then there the right people will be informed.
grep is your friend.
precisely.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Are moderators available here to move the topic to addon forum? Where to find it at all? It's not obvious.
Anyway, I still didn't get any response which approach is advisable to use.