*/ /** * This controller will handle the recovery of passwords that have * been lost or forgotten by the user. * * @package GalleryCore * @subpackage UserInterface * */ class UserRecoverPasswordDownloadView extends GalleryView { function isImmediate() { return true; } /** * @see GalleryView::renderImmediate */ function renderImmediate($status, $error) { global $gallery; $session =& $gallery->getSession(); $authString = $session->get('core.UserRecoverPasswordAdminAuthKey'); if (empty($authString)) { return GalleryCoreApi::error(ERROR_MISSING_VALUE, __FILE__, __LINE__, 'Authorization String Not Set'); } header('Content-Type: text/plain'); header('Content-Length: ' . strlen($authString)); header('Content-Description: Download login.txt to your computer.'); header('Content-Disposition: attachment; filename="login.txt"'); print $authString; return null; } } ?>