DMinch February 2016

Need to create a new admin login for codeigniter through phpmyadmin

I am fairly new to codeigniter and have recently copied over a website with admin users that I do not have the login details for. I want to create a new admin through phpMyAdmin so I can login to the backend of the website.

I have inserted a new admin with name and tried both a) typing in a password and using md5 hash from the dropdown and b) using a third party md5 hash and copying that into the field. Once saved however the admin login doesn't work.

The only other thing I can see different is the ip address field which appears to be encrypted differently as the hash is only 7 characters long, but I'm not sure if that should affect it or what the encryption method for that might be.

Any help much appreciated. Thanks.

Answers


Ashish Raj February 2016

If you have website code with database in phpmyadmin then you can find the website link/url for signup by look into controllers...

Try signup with that link... put your desired password and complete signup...

After signup go in phpmyadmin and the database of the website and find user table.. find your newly inserted user row... copy password of your row and and paste in the default admin user password column data... you will be able to login to the website with your password...

EDIT:

please comment out below line like

/*  if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())
            {
                redirect('auth', 'refresh');
            } */

and then put in url example.com/Auth/create_user and create a user... let it create a new row in the user table and you can do 2 things... 1) Check in the database is dere any column for assign admin role... assign ur newly added user as admin role... something like is_admin or role

2) copy the newly added user password from the table password column of the user row and replace with the password of the admin user row password column in the database

Let me know if it helped...

Post Status

Asked in February 2016
Viewed 1,744 times
Voted 6
Answered 1 times

Search




Leave an answer