Source for file auth.php
Documentation is available at auth.php
* Class that manages the imap autentication method
function validate($user,$pass,$challenge,$response) {
parent::validate($user,$pass,$challenge,$response);
$mailbox = '{' . $this->mConfig['server'];
if ($this->mConfig["sslvalidate"]) {
$mailbox .= "/validate-cert";
$mailbox .= "/novalidate-cert";
$mailbox .= ':'. $this->mConfig["port"]. '}INBOX';
$imapauth = @imap_open($mailbox,$user , $pass);
$this->mErrors['login']= imap_errors();
$this->mInfo["real_name"] = $user;
if(empty($this->mConfig["email"])) {
$this->mInfo["email"] = $user;
$info= array('login'=> $user);
$m = substr($m,1,strlen($m)-2);
if(empty($info[$m])) return "";
return strtolower($info[$m]);');
$this->mErrors['support']= tra("IMAP Authentication is not supported as PHP IMAP Extention not loaded.");
$this->mErrors['create']= tra("Cannot create users in an IMAP Server.");
$this->mErrors[]= tra("Cannot create users in an IMAP Server.");
'users_imap_server' => array(
'label' => "IMAP Server",
'users_imap_ssl' => array(
'label' => "Connect Using SSL",
'users_imap_sslvalidate' => array(
'label' => "Require SSL Certificate to be valid",
'users_imap_port' => array(
'users_imap_email' => array(
'label' => "LDAP User E-Mail Address",
'note' => "If empty the login is used.<br />Otherwise all %login% is replaced with the login name, and the result used as the email address.<br />Please remember to include the @ sign",
'default' => "%login%@redhat.com",
|