Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Login doesnt work after install
Mmunsee
Posted on 17 Jan 2010, 18:01:27

Access: Member
Total Posts: 8
Joined: 2009-07-14

After I install n13 news on my website, and go to login to admin panel the username and pass i set doesnt work?
#1566
Chris
Posted on 18 Jan 2010, 12:58:56

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Try using the forgotten password link on the admin login form. If that doesn't work try reinstalling.
#1617
Mmunsee
Posted on 19 Jan 2010, 00:49:03

Access: Member
Total Posts: 8
Joined: 2009-07-14

I tryed using the forgot password link, and it says the email address i entered doesnt exist, like when i set up the admin info it didnt take?
#1633
Last edited by Mmunsee at 2010-01-19 00:51:44 Reason:
Chris
Posted on 19 Jan 2010, 14:24:39

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Create a new file called adduser.php, inside it put this code

Code:
<?php
require_once 'db.php';
require_once 
'config.php';

$username = 'Yourusername';
$password = 'Yourpassword';
$email = 'your@email.com';

// Check to see if the accesss levels have been created or not
$accesslevel = DataAccess::fetch("SELECT uid FROM $newsaccess WHERE name = ?", "Gods");
if(
count($accesslevel) < 1){
    
// If the God access level doesn't exist, create it
    
DataAccess::put("INSERT INTO `news30_access` (`name`, `accounts`, `accesslevels`, `sysconfig`, `newscats`, `templates`, `smilies`, `wordfilters`, `bannedips`, `accesslevel`, `rss`, `personaloptions`, `privatemsgs`, `autoapproved`, `canapprove`, `usehtml`, `cats`, `profile`, `imageuploads`, `fileuploads`, `news`, `comments`, `help`, `nocat`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", "Gods", "1", "1", "1", "1", "1", "1", "1", "1", "3", "1", "1", "1", "1", "1", "0", "all", "1", "1", "1", "1", "1", "1", "1");
}

// Get the ID of the God access level
$godid = DataAccess::fetch("SELECT uid FROM $newsaccess WHERE name = ?", "Gods");
$godid = $godid['0']['uid'];

// Insert the new account
DataAccess::put("INSERT INTO $newsusers (user, newpass, email, alertmsg, access) VALUES (?, ?, ?, ?, ?)", $username, md5($salt . $password), $email, "0", $godid);

echo 
"User added";
?>


Change the username, password & email at the top to your own details, these will be used to login to the system. Once you've changed the details, place the file inside the news directory and run it from your browser.

If all has gone well you should be prompted with a message saying User Added, you should then be able to login to the admin area with the new account.
#1636
Network-13.com © 2013