Topic: How do I set super admin?

So I deleted the only admin account and I'm not sure how to recover it or to set a SUPER ADMIN. I'm testing out some functions on my site and trying to get everything looking good but now I can't login because I have no account.

:S Is there a way to edit the database or something in my FTP to make any account I want an admin/super admin?

Re: How do I set super admin?

Please use the script below to create a .php file.


include dirname(__FILE__) . '/core/init.php';

$user_name   = 'admin3';
$user_email = '';
$user_pass  = 'password';

// Prevent create new user
if (!db_user_by_name($user_name)) {
    db_user_add($user_name, ACL_LEVEL_ADMIN);

// Update credentials
db_user_update($user_name, "email=$user_email", 'pass='.SHA256_hash($user_pass));

echo "ADD [$user_name]";

You can name the file the way you like, this isn't important but it should have the .php extension. After naming the created file, insert it into the Сutenews root directory next to CN files (for example cn_api.php and the like).  When everything mentioned above is done, set the following parameters:

$user_name, $user_email, $user_pass

Run the script from the website.

When the procedure described above is done, delete the script file and log in as you usually do with the new parameters you have set.

Best regards,
CN Support team