password reset

I'll probably get called out for such a trivial topic, but I am stuck! I have a couple of archival databases and I recently upgraded to Omeka 2.1.4. One database was set up several years ago and I haven't been in on the admin side in over a year. The upgrades went fine, but the password I have for database no. 1 (the older one) doesn't work. I get the prompt to reset by entering my e-mail address, but the e-mail doesn't come through (yes, I have checked the spam folder). What should I do?

There are a couple tricks, depending on what kind of direct access you have to the database and server.

First, if you have direct access to the database, you could double-check there whether the correct email is there for you in the users table.

If that's okay and the email isn't being sent, if you can edit files on the server, first make sure error logging is turned on, and that errors are set to be logged in config.ini. Also in config.ini, set the logging priority to DEBUG:

log.priority = Zend_Log::DEBUG

Finally, in the file /application/controllers/UsersController.php, look for this line around 110:

$body .= __("%s Administrator", $siteTitle);

and add this below it:


That will write a copy of the email to reset your password to the errors log. So, then try again to reset the password, and then go to the log for a copy of the email that will give you the link.

If you don't have access to those options, things will be trickier to figure out.

If you have access to the MySQL server, you can also do this:

omeka_users SET password=sha1(concat(salt, 'NEW_PASSWORD')) WHERE username='USER';

(as a gist

OK. I just checked the "fogot.password.php" in application/views/scripts/users and it appears to be blank.

$pageTitle = __('Forgot Password');
echo head(array('title' => $pageTitle, 'bodyclass' => 'login'), $header);
<h1><?php echo $pageTitle; ?></h1>
<p id="login-links">
<span id="backtologin"><?php echo link_to('users', 'login', __('Back to Log In')); ?></span>

<p class="clear"><?php echo __('Enter your email address to retrieve your password.'); ?></p>
<?php echo flash(); ?>
<form method="post" accept-charset="utf-8">
<div class="field">
<label for="email"><?php echo __('Email'); ?></label>
<?php echo $this->formText('email', @$_POST['email']); ?>

<input type="submit" class="submit" value="<?php echo __('Submit'); ?>" />
<?php echo foot(array(), $footer); ?>

So, do I want to insert my email between the single quotes:
'Enter your email address to retrieve your password.'

I found my old password so thank goodness the issue is resolved. Thank you very much for your help