$account = new GoogleAppsAccount($userid, $forlife);
if ($account->activate_mail_redirection) {
require_once('emails.inc.php');
- $storage = new MailStorageGoogleApps($userid);
- $storage->enable();
+ $storage = new EmailStorage($userid, 'googleapps');
+ $storage->activate();
}
// Sends the 'account created' email to the user, with basic documentation.
if ($account->active()) {
// Re-adds the email redirection (if the user did request it).
if ($account->activate_mail_redirection) {
- $storage = new MailStorageGoogleApps($userid);
- $storage->enable();
+ $storage = new EmailStorage($userid, 'googleapps');
+ $storage->activate();
}
// Sends an email to the account owner.
if (!$this->pending_update_suspension) {
$this->create_queue_job('u_update', array('suspended' => true));
$this->pending_update_suspension = true;
+ XDB::execute(
+ "UPDATE gapps_accounts
+ SET g_status = 'disabled'
+ WHERE g_account_name = {?} AND g_status = 'active'",
+ $this->g_account_name);
}
}