News:

Join the Facebook Fan Page.

Main Menu

Newbie Mistake

Started by DanMB, November 09, 2015, 01:03:29 PM

Previous topic - Next topic

DanMB

i changed my forum username (admin)
it said it will send me a password for the username switch it has not sent me one

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Kindred

well, that's another issue  first -- get your admin account back, active by doing that the FAQ says
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DanMB

Quote from: Kindred on November 09, 2015, 01:37:47 PM
well, that's another issue  first -- get your admin account back, active by doing that the FAQ says
does not seem to work

Illori

what part of it is not working?

DanMB

Quote from: Illori on November 09, 2015, 01:56:23 PM
what part of it is not working?
just comes up with the code when i type in the url

Illori

what comes up with code when you type in what URL? some more details as to what exactly you are trying to do would help us help you.

DanMB

Quote from: Illori on November 09, 2015, 02:09:23 PM
what comes up with code when you type in what URL? some more details as to what exactly you are trying to do would help us help you.
ok.
so i put the code in for smf2 so
<?php

// Pick a username to be the new admin user -- use the login name, not the display name
$yourusername = 'adminusername';

//---------------------------------------------------------------------------

// You should not need to change anything past this point in the script.
// Here we include SSI for globals used within the sql statement
include_once('SSI.php');

// Now run the query to elevate the user to administrator
// Also make sure that the account is activated!
$smcFunc['db_query']('', '
   UPDATE {db_prefix}members
   SET id_group = {int:admingrp},
      is_activated = {int:is_activated}
   WHERE member_name = {string:name}',
   array(
      'admingrp' => 1,
      'is_activated' => 1,
      'name' => $yourusername,
   )
);

echo $yourusername . ' should now be an admin';
?>
UPDATE {$db_prefix}_settings SET value = 0 WHERE variable = 'registration_method';

and when i type in
www.[myforumname].com/createadmin.php
it comes up with the code

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DanMB


Kindred

no....   you need to do actions IN the database.... using phpmyadmin



Quote
Resetting the Password of an Admin User

Follow these instructions:

    Use phpMyAdmin (or similar) to locate (within the "_members" table) the member whose password is to be reset.
    In the database field entitled "passwd", enter a new password using plain text.
    Clear out (erase) any existing content in the database field entitled "password_salt".

The next time the member logs in (using the new password), SMF will automatically re-encrypt the user's credentials.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: