Get Notified when Admin Password Changes
do you often forget your ‘admin’ password in your jobberBase website? here’s a small hack to send yourself (if you are the administrator of the site) a copy of your new password whenever you change it in the admin panel.
1) open up /_includes/class.Postman.php and add this on the list of the public functions:
// notify admin on password change public function ChangePasswordAdmin($password) { $subject = "Your password on " . SITE_NAME . " was changed"; $msg = "Hello! :)"; $msg .= "\n\nYour password was changed and can be accessed at: "; $msg .= "\n\n" . BASE_URL; $msg .= "\n\n---"; $msg .= "\nUsername: admin"; $msg .= "\nPassword: " . $password ; $msg .= "\n---\n\nThank you for using our service!\nThe " . SITE_NAME . " Team"; mail(ADMIN_EMAIL, $subject, $msg, "From: " . SITE_NAME . " <" . NOTIFY_EMAIL . ">"); }
2) open up /admin/page_password.php and add this
$mail = new Postman(); $mail->ChangePasswordAdmin($db->real_escape_string($_POST['new_password']));
before this line:
$smarty->assign('error', 'Your password has been changed!');
so then you don’t have to memorize your password





