input->post->get('jform', array(), 'array'); $files = $this->input->files->get('jform', array(), 'array'); $model = $this->getModel('Profile'); $context = 'com_blogfactory.profile.save'; $data = array_merge($data, $files); $data['id'] = $user->id; if ($model->save($data)) { $msg = BlogFactoryText::_('profile_task_save_success'); $session->set($context, null); } else { $app->enqueueMessage($model->getState('error'), 'error'); $msg = BlogFactoryText::_('profile_task_save_error'); $session->set($context, $data); } $this->setRedirect(BlogFactoryRoute::view('profile'), $msg); return true; } }