Topic: How to recover a CN admin account

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

<?php

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

$user_name   = 'admin3';
$user_email = 'test@test.com';
$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