Skip to content

Instantly share code, notes, and snippets.

@jamesshannon
Created June 26, 2012 05:34
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jamesshannon/2993547 to your computer and use it in GitHub Desktop.
Save jamesshannon/2993547 to your computer and use it in GitHub Desktop.
Concrete5 Password Reset Script
<?php
/**
* This script will reset your admin password to "password"
* It should be named site_post.php and placed at [your web root]/config/site_post.php
* After it's been copied, load your website, and your admin password will be reset
* **** REMEMBER TO DELETE THIS FILE AFTERWARDS, OR YOUR PASSWORD WILL BE CONSTANTLY RESET *****
* Enjoy. james@jamesshannon.com
*/
$ui = UserInfo::getByID(USER_SUPER_ID);
$ui->changePassword('password');
echo "Your admin password was updated. Remove the file located at config/site_post.php and log in with the following credentials:<br />";
if (USER_REGISTRATION_WITH_EMAIL_ADDRESS) {
echo "Email Address: " . $ui->getUserEmail();
} else {
echo "Username: " . $ui->getUserName();
}
echo "<br />Password: password";
die;
@kumanan-c
Copy link

Thanks for posting this article, after executing this file only i know that user name is "admin". :) in that concrete 5 website creation process they are asking user email address for configuration but when i login to this website they didn't accept the email address as username.

@jamesshannon
Copy link
Author

Hi @kumanac. Sorry for the delay. I don't think github sends emails when comments are left.

Um... this script will show you the thing you need to log in with, whether it's the username (which may or may not be admin), or the email address -- depending on how this particular c5 instance is configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment