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
 protected function hook_preUpdate()
 {
     $this->file_parent = $this->file_id;
     if ((int) $this->file_size > 0) {
         $this->file_id = 0;
         $this->file_owner = $this->_AppUI->user_id;
     }
     parent::hook_preUpdate();
 }