/** * Returns the waste basket * If the wastebasket is set to one backend, return the wastebasket of that backend * else return the first waste basket we can find * * @access public * @return string */ function GetWasteBasket() { ZLog::Write(LOGLEVEL_DEBUG, "Combined->GetWasteBasket()"); if (isset($this->activeBackend)) { if (!$this->activeBackend->GetWasteBasket()) { return false; } else { return $this->activeBackendID . $this->config['delimiter'] . $this->activeBackend->GetWasteBasket(); } } return false; }
/** * Logins using the backend's Logon function. * * @param IBackend $backend * @param String $incomingXml * @access private * @throws AuthenticationRequiredException if no login data was sent. * * @return string $username */ private function login($backend, $incomingXml) { // Determine the login name depending on the configuration: complete email address or // the local part only. if (USE_FULLEMAIL_FOR_LOGIN) { ZLog::Write(LOGLEVEL_DEBUG, sprintf("Using the complete email address for login.")); $username = $incomingXml->Request->EMailAddress; } else { ZLog::Write(LOGLEVEL_DEBUG, sprintf("Using the username only for login.")); $username = Utils::GetLocalPartFromEmail($incomingXml->Request->EMailAddress); } if ($backend->Logon($username, "", $_SERVER['PHP_AUTH_PW']) == false) { throw new AuthenticationRequiredException("Access denied. Username or password incorrect."); } ZLog::Write(LOGLEVEL_DEBUG, sprintf("ZPushAutodiscover->login() Using '%s' as the username.", $username)); return $username; }
public static function unRegisterBackend(IBackend $backend) { unset(self::$backends[$backend->getId()]); }