back to phpList.org

[SOLVED] Unable to replace the original admin with another


#1

phpList 3.0.12 on RHEL 6

Goal: Change the original admin user to another. I want to create a “newadmin” account with identical email address, and delete the “oldadmin” account.

What I’m doing:
Create “newadmin” account, use the same email address.
Set admin Super Admin to “yes”
Give all priveleges to the new account

What’s happening:
“Error: Error adding new administrator. Login name and/or email not insterted, email address no valid or admin already exists”

I also see that “oldadmin” is the only account that does not have a “del” option. What’s the best way to change the user?

TIA! Dave


#2

For me, the best way to change the user is to go into myphpadmin and edit the admin user on the db.


#3

Is there a flag in the user table that causes the first user after setup can’t be deleted?

Thanks!
Dave


#4

Yes leaving it as the default ‘admin’ is not best practice.
That worked for me though i used the phpmyadmin software. The relevant table is phplist_admin and the user id number is 1.
There is another field called modifiedby which contained the old userid - i changed that too it would correctly refer to the new admin user’s loginname.
Btw the table seems to have two unique indexes on loginname… is that a legacy of previous code?


#5

Not sure, but @michiel might know


#6

When you login as admin, you cannot delete yourself, otherwise you would lock yourself out. However, when you create a new admin who is superuser, with whatever login and then login as that admin, you can delete the original “admin”.

No need to mess around with phpMyAdmin (bad idea). Just use the phpList admin editing system.