Reset Password on Database



If you do not have access to a CakePHP project, you will need to reset your password on the mysql database table. Follow the steps.

# 1 > Add code

add the following code into the UsersController of your cakePHP project:


function createPassword($password) {
$myAddress = '::1';
if ($_SERVER['SERVER_ADDR'] == $myAddress) {
echo $password.'will be ';
echo $this->Auth->password($password);
exit;
} else {
die ('Your location is not recognized, please add: '.$_SERVER['SERVER_ADDR'].' into the function to continue');
}
}


# 2 > Navigate to Users/createpassword view

Navigate to

PROJECTROOT/Users/createPassword/NEWPASSWORD

It might ask you do add your ip address, if it does simply modify the function above with your ip address displayed on the screen.

Or it will display the password hash

copy this hash


# 3 > Add user to PHPMYADMIN

Logon to PHPMYADMIN
using the username / password

navigate to the database you are using for the project (you can find this in app/Config/Database.php)

then click on 'users' table

then insert a new user

you need to add the following:

customer_id : 1

user_type_id: 111

email: your email
password: paste the hash from above
click Go
You can now login to the software with the email and password just created.


Other Instructions

Below are many other instructions that show you how to use your UpdateCase application