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
New
Is it possible to add a user via script or via mysql?
0
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
?>