Example #1
0
 protected function hook_preUpdate()
 {
     $this->perm_func = 'updateLogin';
     $tmpUser = new CUser();
     $tmpUser->overrideDatabase($this->_query);
     $tmpUser->load($this->user_id);
     if ('' == trim($this->user_password)) {
         $this->user_password = $tmpUser->user_password;
     } elseif ($tmpUser->user_password != $this->authenticator->hashPassword($this->user_password)) {
         $this->user_password = $this->authenticator->hashPassword($this->user_password);
     } else {
         $this->user_password = $tmpUser->user_password;
     }
     parent::hook_preUpdate();
 }
Example #2
0
 public function notifyOwner($isNotNew)
 {
     $user = new CUser();
     $user->overrideDatabase($this->_query);
     $user->loadFull($this->project_owner);
     $subject = intval($isNotNew) ? $this->_AppUI->_('Project updated') . ': ' . $this->project_name : $this->_AppUI->_('Project submitted') . ': ' . $this->project_name;
     $emailManager = new w2p_Output_EmailManager($this->_AppUI);
     $body = $emailManager->getProjectNotify($this, $isNotNew);
     $mail = new w2p_Utilities_Mail();
     $mail->To($user->user_email, true);
     $mail->Subject($subject);
     $mail->Body($body, isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : '');
     $mail->Send();
 }
Example #3
0
 public function notifyOwner($isNotNew)
 {
     global $w2Pconfig, $locale_char_set;
     $mail = new w2p_Utilities_Mail();
     $subject = intval($isNotNew) ? "Project Updated: {$this->project_name} " : "Project Submitted: {$this->project_name} ";
     $user = new CUser();
     $user->overrideDatabase($this->_query);
     $user->loadFull($this->project_owner);
     if ($user && $mail->ValidEmail($user->user_email)) {
         $emailManager = new w2p_Output_EmailManager($this->_AppUI);
         $body = $emailManager->getProjectNotifyOwner($this, $isNotNew);
         $mail->Body($body, isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : '');
         $mail->To($user->user_email, true);
         $mail->Send();
     }
 }