Get aliases and redirections for accounts
This commit is contained in:
parent
53404964ac
commit
2b0a51d115
|
@ -102,9 +102,6 @@ if (isset($_GET['account'])) {
|
|||
print "<label for='maildrop[]' class='col-sm-3 control-label'>Mails entrants redirigés vers : </label>";
|
||||
print "<div class='col-sm-7'><input type='text' name='maildrop[]' value='".$red."' class='form-control' /></div>";
|
||||
print "<div class='col-sm-2 control-label'>";
|
||||
if (!$conf['domaines']['onlyone']) {
|
||||
print "@" .$domain->getName();
|
||||
}
|
||||
print "</div>";
|
||||
print "</div>";
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
class LdapAccount extends LdapDomain {
|
||||
protected $domain,$uid,$name,$active=false,$admin=false,$courier=false,$authsmtp=false;
|
||||
private $aliases=array(),$redirections=array();
|
||||
|
||||
public function __construct($domain, $uid) {
|
||||
$this->conn = $domain->conn;
|
||||
|
@ -17,6 +18,8 @@ class LdapAccount extends LdapDomain {
|
|||
$this->courier = ($object['courieractive'][0] == 'TRUE') ? true : false;
|
||||
$this->authsmtp = ($object['authsmtpactive'][0] == 'TRUE') ? true : false;
|
||||
//$this->quota = getquota($this->domain,'user');
|
||||
$this->aliases = array_filter($object['mailacceptinggeneralid'], "is_string");
|
||||
$this->redirections = array_filter($object['maildrop'], "is_string");
|
||||
} else {
|
||||
throw new Exception("Ce compte n'existe pas !");
|
||||
}
|
||||
|
@ -57,11 +60,11 @@ class LdapAccount extends LdapDomain {
|
|||
}
|
||||
|
||||
public function getAliases() {
|
||||
return array();
|
||||
return preg_replace('/@'.$this->domain.'/', '', $this->aliases);
|
||||
}
|
||||
|
||||
public function getRedirections() {
|
||||
return array();
|
||||
return $this->redirections;
|
||||
}
|
||||
|
||||
public function isCourier() {
|
||||
|
|
Loading…
Reference in a new issue