Exemple #1
0
 /**
  * Send message for admin when created new user.
  *
  * @return void
  */
 public function adminNewUserMsg()
 {
     $adminMail = Plugin::params('Union/Core')->get('admin_mail', '*****@*****.**');
     $tpl = $this->_params->get('msg_adm_new_registration');
     $msg = $this->_macros->text($tpl);
     $subject = $this->_params->get('msg_adm_new_reg_subject', __d('community', 'Registered a new user'));
     $this->send($subject, $msg, $adminMail);
 }
Exemple #2
0
 /**
  * Sending notifications to the administrator of the new user registration.
  *
  * @return void
  */
 public function sendAdminMessageNewReg()
 {
     $emailTo = $this->config->get('site_email', '*****@*****.**');
     $message = $this->_community->get('msg_adm_new_registration', null);
     $message = Macros::getInstance($this->_arrayData)->text($message);
     if (isset($this->_entityId) && $message) {
         $subject = __d('community', 'New user registration at the site: {0}', $this->_serverName);
         $this->_send($subject, $message, $emailTo);
     }
 }
Exemple #3
0
 /**
  * Email constructor.
  *
  * @param Entity $entity
  */
 public function __construct(Entity $entity)
 {
     $config = PluginConfig::getInstance()->getGroup('union_core');
     $this->_entity = $entity;
     $this->config = $config->params();
     $this->_entityId = $entity->get('id');
     $this->_arrayData = $entity->toArray();
     $this->_serverName = Union::serverName();
     $this->mailer = $this->config->get('mailer', 'mail');
     $this->fromName = $this->config->get('mailfrom', 'Union CMS');
     $this->fromEmail = $this->config->get('mailname', '*****@*****.**');
 }
Exemple #4
0
 public function testOption_timeout()
 {
     $resp = $this->_cms['http']->request('http://mockbin.org/delay/5001', array(), array('timeout' => 2));
     is(0, $resp->code);
     $resp = $this->_cms['http']->request('http://mockbin.org/delay/5002', array(), array('timeout' => 10));
     $data = new JSON($resp->body);
     isSame(5002, $data->get('delay'));
 }