MyBB Community Forums

Full Version: Edit regdate
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to edit the regdate of a user?
My php admin: regdate: 1141466444 That is Saturday, 4th March 2006
How kan I change it what does the code mean?
Hello there,

You will have to edit the field from the phpmyadmin.
That number is a unix timestamp , you will need to convert real time into unix timestamp. Anyway if you want, you may tell me which date, and i give you the appropriate time stamp.

regards
8 May 2006 08:33

1147033980

Far from perfect, but I wrote out a little script to make this easier to do. I never bothered to make it part of MyBB (though maybe in the future I'll make this a plugin), but maybe you'll find it useful.

Make sure to change the database information and set a password to use the script.

galen, you dont need this

// database connection information
$dbuser = "DATABASE_USERNAME";
$dbpass = "DATABASE_PASSWORD";
$dbname = "DATABASE_NAME";
$dbprefix = "mybb"; // do NOT include the underscore

// set a password so only you can use this script
$admin_pass = "ADMIN_PASSWORD";

 mysql_connect(localhost,$dbuser,$dbpass);
@mysql_select_db($dbname) or die("Unable to select database");

you can replace them all by

require "./global.php"; 

plus to all that, some fields are missing, i mean where is the mode ? and where is the admin username.

moreover

if ($mode == 'update' && $admin === $admin_pass)
this wont work, unless you have the password in the file, which i dont like, and i prefer using a query that will compare the record in the database.

regards
Galen Wrote:Far from perfect, but...

I wrote that up in 5 minutes over a year ago to do the same thing on phpBB and another board. It's intended to be software independant since it can be used with multiple message boards (as far as I can recal, they ALL store the regdate in exactly the same place in the db).
If I included the db connection info from the MyBB (or any other program) and the admin creditials from a specific program, it wouldn't be useful for all forums anymore.

And I really never intended to keep it on the server, but when I gave it to some friends, I added the password field in case THEY left it on the server. It's FAR from secure, but it's better than having the program just sitting there with no protection at all. Ideally though, this should be used and deleted from the server immediately.