public function restorepasswordAction() { if ($this->getParam('hash') && $this->getParam('newpassword')) { $user = $this->_model->fetchRow($this->_model->select()->where('salt = ?', $this->getParam('hash'))); if ($user) { $this->_model->update(array('password' => md5(Zend_Registry::get('config')->Db->staticSalt . md5($this->getParam('newpassword')) . $user->salt)), $this->_model->getAdapter()->quoteInto('username = ?', $user->username)); } } }