Fixing user profile edit to display updated information after save.

This commit is contained in:
Dan Cryer 2014-12-01 16:03:35 +00:00
parent 7b792c9541
commit ddd46ba9ad

View file

@ -57,7 +57,6 @@ class UserController extends Controller
public function profile()
{
$user = $_SESSION['phpci_user'];
$values = $user->getDataArray();
if ($this->request->getMethod() == 'POST') {
$name = $this->getParam('name', null);
@ -65,8 +64,11 @@ class UserController extends Controller
$password = $this->getParam('password', null);
$_SESSION['phpci_user'] = $this->userService->updateUser($user, $name, $email, $password);
$user = $_SESSION['phpci_user'];
}
$values = $user->getDataArray();
$form = new Form();
$form->setAction(PHPCI_URL.'user/profile');
$form->setMethod('POST');