We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Adding new users via MYSQL | Forum

John
John Aug 21 '14
I have an Oxwall community with  a few thousand members but for the last year it has been locked because I can't get rid of bot sign ups. All the anti bot and anti spam don't work.

What I want to do is by pass the oxwall sign up and  make my own sign up system and add new people directly to the database.

The way to add a user to the base user table is below. However it doesn't seem to do the full job.

Does anyone know of a mysql query or series of queries which would add a fully formed new person?

It is a shame that Oxwall is effectively unusable because of spam bots.


INSERT INTO `db_xwl2`.`ow_base_user` (
`id` ,
`email` ,
`username` ,
`password` ,
`joinStamp` ,
`activityStamp` ,
`accountType` ,
`emailVerify` ,
`joinIp`
)
VALUES (
NULL , '$email', '$username', '$hash', '1321777145', '1381395603', '290365aadde35a97f11207ca7e4279cc', '1', '0'
)


ross Team
ross Aug 21 '14
Topic was moved from General Questions.
John
John Aug 22 '14
Nobody has answered me yet but I am finding the answer myself.

Step 1:
Add the user to the ow_base_user
Step 2:
Give them a real name by adding the real name to ow_base_question_data
Like this

$last_insert_id = mysqli_insert_id($con);


$realname_query = "INSERT INTO `db_xwl2`.`ow_base_question_data` (
`id` ,
`questionName` ,
`userId` ,
`textValue` ,
`intValue` ,
`dateValue`
)
VALUES (
NULL , 'realname', '$last_insert_id', 'brian_$timestamp', '0', NULL
)";

Now I need to give them a ROLE.

How do I give them a ROLE ????
Where is the role info kept?



John
John Aug 22 '14
Step 3 Add user role

INSERT INTO `db_xwl2`.`ow_base_authorization_user_role` (`id`, `userId`, `roleId`) VALUES ('', '$user_id', '13');

Are there any more steps???
Alia Team
Alia Aug 22 '14
John, it is much easier just to import users from CSV or excel file via CSV importer plugin. Have you considered such option?

Lucas
Lucas Sep 29 '14
Hi Aliia,

I THINK THE IMPORTER PLUGIN DOES NOT WORK.


ANY HELP