auth* : the details can be provided in all the cases : if the user is authenticated, at least, return the email

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3019 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2016-09-01 11:02:42 +00:00
parent 276f97836c
commit 9b0724bf56
2 changed files with 8 additions and 6 deletions

View File

@@ -18,6 +18,9 @@ class authimap extends auth
/** IMAP SSL CheckCertificate */
public $imapSSLCheckCertificates = true;
/** The details available after authentication */
private $details = null;
/** Check the availablity of the IMAP support in PHP */
function __construct ()
{
@@ -40,6 +43,7 @@ class authimap extends auth
$imap = new imap ($this->imapServer, $this->imapPort,
$email, $password,
$this->imapSSL, $this->imapSSLCheckCertificates);
$this->details = array ("email"=>$email);
// Let the throw Exception be catched by the parent
return true;
}
@@ -47,8 +51,7 @@ class authimap extends auth
/** Return all the parameters recorded for the authenticate user */
public function getdetails ()
{
throw new Exception (dgettext("domframework",
"Can't get details for IMAP users"), 405);
return $this->details;
}
/** Method to change the password