<?php

/**
  * SquirrelMail Password Forget Plugin
  * Copyright (C) 2004 Paul Lesneiwski <pdontthink@angrynerds.com>
  * This program is licensed under GPL. See COPYING for details
  *
  */


if (!defined('SM_PATH'))
   define('SM_PATH', '../');



/**
  * Register this plugin with SquirrelMail
  *
  */
function squirrelmail_plugin_init_password_forget()
{
  global $squirrelmail_plugin_hooks;

  $squirrelmail_plugin_hooks['login_top']['password_forget'] = 'password_forget_pre';
  $squirrelmail_plugin_hooks['login_before']['password_forget'] = 'password_forget_post';
}


/**
  * Returns version info about this plugin
  *
  */
function password_forget_version()
{

    return '2.1';

}


/**
  * Inserts obfuscated password field
  *
  */
function password_forget_pre() 
{

  include_once(SM_PATH . 'plugins/password_forget/functions.php');
  password_forget_pre_do();

}


/**
  * Decyphers obfuscated password field
  *
  */
function password_forget_post() 
{

  include_once(SM_PATH . 'plugins/password_forget/functions.php');
  password_forget_post_do();

}


?>
