mrc0mmand wrote:Why would someone delete admin account? If you at least want to login into your tt-rss instance, recreate admin account with default values:
Code: Select all
INSERT INTO ttrss_users (login, pwd_hash, access_level) VALUES('admin', 'SHA1:5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8', 10);
Sadly, I don't have an idea, how to change default user for single user mode, because I've never used it before.
(Well, you could probably change name and password of your existing user to default values of admin user, but honestly I don't know if it would work)
Except those aren't the default values (at least not all of them!). You see, one of the side effects of 'admin' being the first user created is that it's id is set to 1. And if you note here in the code:
Code: Select all
if (SINGLE_USER_MODE) {
$result = db_query("SELECT id FROM ttrss_users WHERE id = 1");
if (db_num_rows($result) != 1) {
array_push($errors, "SINGLE_USER_MODE is enabled in config.php but default admin account is not found.");
}
}
It's looking for a user id of 1. He may be able to recover by setting the id of admin to 1.
Code: Select all
UPDATE ttrss_users SET id='1' WHERE login='admin';
But I'd not hold my breath. I don't know what all else is setup when a user is created beyond what's in the ttrss_users table. This monumental level of "well done" is a bit beyond my understanding. I think the best advice (if the above doesn't work) is:
For whatever he's calling it.
Narga wrote:After created new account, I deleted admin user from phpMyAdmin
Incredible.