HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Is it possible to add a user via script or via mysql?
![PWisnia](https://secure.gravatar.com/avatar/67b95b0aaf73ecf4ae8ec8d01a3d7300/?default=https%3A%2F%2Fvanillicon.com%2Ff3d2f0c027b7082759c09106470a7412_100.png&rating=g&size=100)
Is it possible to add a user via script or via mysql?
0
Is it possible to add a user via script or via mysql?
Comments
Yes.
Do you want to create a user from within a Vanilla plugin, with an external PHP script or merely with an SQL query? All of that is possible. I would always recommend to do that from within a plugin.
When you install Vanilla from scratch, some users are created. The code which does that is located in the "stub" plugin: https://github.com/vanilla/vanilla/blob/master/plugins/stubcontent/class.stubcontent.plugin.php#L213
It's slightly more complex than creating a single user must be, but it shows how to use Vanillas UserModel
Have you considered using the API? I'm not sure what your use case is, but I suspect that will be more beneficial to you.
How to do?
@Linc And how to use it?
I would like to use it in a way like this, but it is for a different engine, and how to convert it?
or
<?php
$o = $_GET['imie'];
$o2 = $_GET['email'];
$o3 = $_GET['rodzaj'];
$o4 = $_GET['tresc'];
-- forum code
?>