Example #1
0
 /**
  * Reloads current user info stored in the application session.
  *
  * @param Request $request Current router request.
  *
  * @return void
  */
 protected function afterEdit(Request $request)
 {
     parent::afterEdit($request);
     if ($request->is('post') && !$this->resource->hasErrors()) {
         if ($this->resource->getPrimaryKeyValue() == $this->user->getPrimaryKeyValue()) {
             Core\Session()->set('cms_user_info', rawurlencode(serialize($this->resource)));
             $this->user = $this->resource;
         }
     }
 }