mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-29 01:59:19 +01:00
add an additional static method Api\Mail\Smtp::mailbox_address()
as PHP 8.0 does not allow to call a non-static method static, even if $this is (conditionally) not used
This commit is contained in:
parent
0c4b719c5b
commit
7e26f64e49
@ -233,10 +233,23 @@ class Smtp
|
||||
* default use $this->loginType
|
||||
* @return string
|
||||
*/
|
||||
/*static*/ public function mailbox_addr($account,$domain=null,$mail_login_type=null)
|
||||
public function mailbox_addr($account, $domain=null, $mail_login_type=null)
|
||||
{
|
||||
return self::mailbox_address($account, $domain ?? $this->defaultDomain, $mail_login_type ?? $this->loginType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build mailbox address for given account and mail_addr_type
|
||||
*
|
||||
* If $account is an array (with values for keys account_(id|lid|email), it does NOT call accounts class
|
||||
*
|
||||
* @param int|array $account account_id or whole account array with values for keys
|
||||
* @param string $domain domain
|
||||
* @param string $mail_login_type=null standard(uid), vmailmgr(uid@domain), email or uidNumber
|
||||
* @return string
|
||||
*/
|
||||
static public function mailbox_address($account, string $domain, string $mail_login_type=null)
|
||||
{
|
||||
if (is_null($domain)) $domain = $this->defaultDomain;
|
||||
if (is_null($mail_login_type)) $mail_login_type = $this->loginType;
|
||||
|
||||
switch($mail_login_type)
|
||||
{
|
||||
|
@ -340,7 +340,7 @@ class Sql extends Mail\Smtp
|
||||
}
|
||||
}
|
||||
|
||||
// let interesed parties know account was update
|
||||
// let interested parties know account was update
|
||||
Api\Hooks::process(array(
|
||||
'location' => 'mailaccount_userdata_updated',
|
||||
'account_id' => $_uidnumber,
|
||||
|
Loading…
Reference in New Issue
Block a user