ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
vpopmail.php
Go to the documentation of this file.
1<?php
2/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
3
29require_once "Auth/Container.php";
33require_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?>
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
$result
const PEAR_ERROR_DIE
Definition: PEAR.php:34
Auth_Container_vpopmail()
Constructor of the container class.
Definition: vpopmail.php:57
fetchData($username, $password)
Get user information from vpopmail.
Definition: vpopmail.php:75
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246
& 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's de...
Definition: PEAR.php:524