Esempio n. 1
0
 /**
  * postSave
  *
  * @param DataInterface $data
  *
  * @return  void
  */
 protected function postSave(DataInterface $data)
 {
     // Image
     if (false !== SingleImageDragField::uploadFromController($this, 'avatar', $data, AvatarUploadHelper::getPath($data->id))) {
         $this->model->save($data);
     }
     // Set user data to session if is current user.
     if (User::get()->id == $data->id) {
         User::makeUserLoggedIn(User::get($data->id));
     }
 }
Esempio n. 2
0
 /**
  * postSave
  *
  * @param DataInterface $data
  *
  * @return  void
  */
 protected function postSave(DataInterface $data)
 {
     parent::postSave($data);
     // Set user data to session if is current user.
     if (User::get()->id == $data->id) {
         User::makeUserLoggedIn(User::get($data->id));
     }
 }