Fixed minor bug when changing user name fails

This commit is contained in:
Marcin Kurczewski 2013-10-15 20:33:53 +02:00
parent 23ac43ecac
commit 1b3ce29b46

View file

@ -110,6 +110,9 @@ class UserController
*/ */
public function editAction($name) public function editAction($name)
{ {
try
{
$user = self::locateUser($name); $user = self::locateUser($name);
$edited = false; $edited = false;
$secondary = $user->id == $this->context->user->id ? 'own' : 'all'; $secondary = $user->id == $this->context->user->id ? 'own' : 'all';
@ -175,6 +178,13 @@ class UserController
R::store($user); R::store($user);
$this->context->transport->success = true; $this->context->transport->success = true;
} }
}
catch (Exception $e)
{
$this->context->transport->user = self::locateUser($name);
throw $e;
}
} }