MyBB Community Forums

Full Version: Register new user with PHP script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Can anyone please tell me which tables I need to modify and how I need to modify them so that I will be able to successfully add users to my forum without using the registration process MyBB provides by default? I have been looking quite extensively for a few days but am in vain. I can only find techniques that can create the form in a different page. I need to be able to have my hands on the actual data.

Thanks in advance. Your help is much appreciated.
You can add them in the ACP... ACP > Users & Groups > Create New User.
You could have used the search button brother.
Which I know do Wink
Matt_ always tells me to do it, so now I do before I post any issues Smile
(2008-12-10, 11:20 PM)Matt_ Wrote: [ -> ]You can add them in the ACP... ACP > Users & Groups > Create New User.

I am sorry if I was not clear enough about what I wanted to know. I want to know which MySQL tables are used while registering a new user. I mean all the tables and not just the 'users' table. If I add though the 'users' table, the number of users and the latest user field do not get updated.
*prefix*_users. That's the only one. I believe the latest user is controlled via the cache.
(2008-12-11, 12:36 AM)RenegadeFan Wrote: [ -> ]*prefix*_users. That's the only one. I believe the latest user is controlled via the cache.

It would be great if that is the case. Simple and easy. But can you tell me about the encryption that is used here? What kind of hash is it?

Thanks.
It is a salt hash. There's quite a few steps that it must go through. Best look at the verify_password function in the user.php of the datahandlers.
(2008-12-11, 01:01 AM)RenegadeFan Wrote: [ -> ]It is a salt hash. There's quite a few steps that it must go through. Best look at the verify_password function in the user.php of the datahandlers.

I just found out that the stats are stored in the 'datacache' table. Have any ideas how to easily update them as they are not being updated automatically when I am adding or removing users from the 'users' table.

Thanks. And I found out how to create the hash.
You need a datacache object (inc/class_datacache.php).
Then you can call
$cache->update_stats();
(2008-12-11, 06:17 AM)DennisTT Wrote: [ -> ]You need a datacache object (inc/class_datacache.php).
Then you can call
$cache->update_stats();

I tried using the following code but it seems like something is going wrong as the code is not running until the end. It is getting an error somewhere in the middle.

<?php 
require ('class_datacache.php');
echo('Update starting...');
$cache = new datacache;
$cache->update_stats();
echo('Updated Finished!');
?>

I am not being able to see the ending statement of 'Update Finished!' when I am running the code. I have this file inside the 'inc' directory, where the class_datacache.php is also located.

Please tell me what I am doing wrong. Thanks.
Pages: 1 2 3