protected function _createObjectOperation()
 {
     if (isset($_FILES[$this->name]['tmp_name']['file'])) {
         if ($_FILES[$this->name]['size']['file'] > ini_get('upload_max_filesize') * 1024 * 1024) {
             MessageBox::writeWarning('uploaded file size exceeds limit');
             return false;
         }
         $this->object->set('tmp_file_path', $_FILES[$this->name]['tmp_name']['file']);
         $this->object->set('file_name', $_FILES[$this->name]['name']['file']);
         $this->object->set('mime_type', $_FILES[$this->name]['type']['file']);
     }
     return parent::_createObjectOperation();
 }
 protected function _validPerform($request, $response)
 {
     $user_object = Limb::toolkit()->createSiteObject('UserObject');
     $data = $this->dataspace->export();
     try {
         $user_object->changeOwnPassword($data['password']);
     } catch (SQLException $e) {
         throw $e;
     } catch (LimbException $e) {
         $request->setStatus(Request::STATUS_FAILED);
     }
     $request->setStatus(Request::STATUS_FORM_SUBMITTED);
     Limb::toolkit()->getUser()->logout();
     MessageBox::writeWarning(Strings::get('need_relogin', 'user'));
 }
 public function _validPerform($request, $response)
 {
     parent::_validPerform($request, $response);
     if ($this->_changingOwnPassword()) {
         Limb::toolkit()->getUser()->logout();
         MessageBox::writeWarning(Strings::get('need_relogin', 'user'));
     } else {
         $object_data = $this->_loadObjectData();
         Limb::toolkit()->getSession()->storageDestroyUser($object_data['id']);
     }
     if ($request->getStatus() == Request::STATUS_SUCCESS) {
         if ($request->hasAttribute('popup')) {
             $response->write(closePopupResponse($request, '/'));
         }
     }
 }