Advertisement
Guest User

Igor, AfterLogic Support

a guest
Jun 1st, 2011
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <?php
  2.  
  3. class CDefaultValuesPlugin extends AApiPlugin
  4. {
  5.     /**
  6.      * @param CApiPluginManager $oPluginManager
  7.      */
  8.     public function __construct(CApiPluginManager $oPluginManager)
  9.     {
  10.         parent::__construct('1.0', $oPluginManager);
  11.  
  12.         $this->AddHook('api-account-construct', 'PluginApiAccountConstruct');
  13.     }
  14.  
  15.     /**
  16.      * @param CAccount $oAccount
  17.      */
  18.     public function PluginApiAccountConstruct(&$oAccount)
  19.     {
  20.         if (is_a($oAccount, 'CAccount'))
  21.         {
  22.             $oAccount->MailMode =
  23.                 EAccountMailMode::KeepMessagesOnServerAndDeleteMessageWhenItsRemovedFromTrash;
  24.         }
  25.     }
  26.  
  27. }
  28.  
  29. return new CDefaultValuesPlugin($this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement