DirectAdmin\LetsEncrypt\Lib\Account::setEmail PHP Method

setEmail() public method

Set e-mail of account
public setEmail ( $email )
$email
    public function setEmail($email)
    {
        $this->email = $email;
    }

Usage Example

Exemplo n.º 1
0
 if (in_array($user, ['.', '..']) || empty($user)) {
     continue;
 }
 // Create account object
 $account = new Account($user, null, $config->config('server'));
 // Is there a config file present?
 if (!$account->existsInStorage('config.json')) {
     $log->log('Skipped user ' . $account->getUsername());
     continue;
 }
 $log->log('Processing user ' . $account->getUsername());
 if (!$account->loadKeys()) {
     $log->log('No keys present at user ' . $account->getUsername());
     continue;
 }
 $account->setEmail($account->config('email'));
 // Get all domains of the user
 $domains = file_get_contents($usersPath . DIRECTORY_SEPARATOR . $account->getUsername() . DIRECTORY_SEPARATOR . 'domains.list');
 // Loop through all domains of the user
 foreach (explode("\n", $domains) as $domain) {
     if (empty($domain)) {
         continue;
     }
     // Replace the $domain with our Domain object,
     $domain = new Domain($domain, $account);
     if (!$domain->existsInStorage('config.json')) {
         $log->log('Skipped domain ' . $domain->getDomain());
         continue;
     }
     $log->log('Processing domain ' . $domain->getDomain());
     // Check if a renew is required, if everything needs to be checked within 10 days or in the past