Auth
[ class tree: Auth ] [ index: Auth ] [ all elements ]

Source for file vpopmail.php

Documentation is available at vpopmail.php

  1. <?PHP
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2003 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.02 of the PHP license,      |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Author: Stanislav Grozev <tacho@orbitel.bg>                          |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: vpopmail.php,v 1.5 2006/03/01 06:08:56 aashley Exp $
  20. //
  21.  
  22. require_once "Auth/Container.php";
  23. require_once "PEAR.php";
  24.  
  25. /**
  26.  * Storage driver for fetching login data from vpopmail
  27.  *
  28.  * @author   Stanislav Grozev <tacho@orbitel.bg>
  29.  * @author   Adam Ashley <aashley@php.net>
  30.  * @package  Auth
  31.  * @version  $Revision: 1.5 $
  32.  */
  33.  
  34.     // {{{ Constructor
  35.  
  36.     /**
  37.      * Constructor of the container class
  38.      *
  39.      * @return void 
  40.      */
  41.     function Auth_Container_vpopmail()
  42.     {
  43.         if (!extension_loaded('vpopmail')) {
  44.             return PEAR::raiseError('Cannot use VPOPMail authentication, '
  45.                     .'VPOPMail extension not loaded!'41PEAR_ERROR_DIE);
  46.         }
  47.     }
  48.  
  49.     // }}}
  50.     // {{{ fetchData()
  51.  
  52.     /**
  53.      * Get user information from vpopmail
  54.      *
  55.      * @param   string Username - has to be valid email address
  56.      * @param   string Password
  57.      * @return  boolean 
  58.      */
  59.     function fetchData($username$password)
  60.     {
  61.         $userdata = array();
  62.         $userdata preg_split("/@/"$username2);
  63.         $result @vpopmail_auth_user($userdata[0]$userdata[1]$password);
  64.  
  65.         return $result;
  66.     }
  67.  
  68.     // }}}
  69.  
  70. }
  71. ?>

Documentation generated on Mon, 11 Mar 2019 14:37:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.