ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
vpopmail.php
Go to the documentation of this file.
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
3 
29 require_once "Auth/Container.php";
33 require_once "PEAR.php";
34 
49 
50  // {{{ Constructor
51 
58  {
59  if (!extension_loaded('vpopmail')) {
60  return PEAR::raiseError('Cannot use VPOPMail authentication, '
61  .'VPOPMail extension not loaded!', 41, PEAR_ERROR_DIE);
62  }
63  }
64 
65  // }}}
66  // {{{ fetchData()
67 
75  function fetchData($username, $password)
76  {
77  $this->log('Auth_Container_vpopmail::fetchData() called.', AUTH_LOG_DEBUG);
78  $userdata = array();
79  $userdata = preg_split("/@/", $username, 2);
80  $result = @vpopmail_auth_user($userdata[0], $userdata[1], $password);
81 
82  return $result;
83  }
84 
85  // }}}
86 
87 }
88 ?>
fetchData($username, $password)
Get user information from vpopmail.
Definition: vpopmail.php:75
$result
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
Auth_Container_vpopmail()
Constructor of the container class.
Definition: vpopmail.php:57
const PEAR_ERROR_DIE
Definition: PEAR.php:34
& raiseError($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
This method is a wrapper that returns an instance of the configured error class with this object&#39;s de...
Definition: PEAR.php:524
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246