VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: mhs_pro on January 20, 2019, 14:16:30 PM

Title: How to create vm user by API function
Post by: mhs_pro on January 20, 2019, 14:16:30 PM
Hi
I want create user with API function in vm 3

I checked how a user was register
in public_html/administrator/component/com_virtuemart/models/user.php there is a function named store(&$data).
This function checks vRequest::vmCheckToken

How can I fill out the vRequest?

Title: Re: How to create vm user by API function
Post by: GJC Web Design on January 20, 2019, 18:46:21 PM
is it there when u JSession::getFormToken();  ?
Title: Re: How to create vm user by API function
Post by: Studio 42 on January 21, 2019, 14:27:09 PM
Use JSession::getFormToken(); to get right form field and add it to the POST  using Joomla or server $_POST before trying to add a user.
Not that this is fully unsafe, to set it,  so you should add a password or private key