Fix how the update of user data is done when update email is requiered

stable
Jesús Espino 2015-03-10 17:07:36 +01:00 committed by David Barragán Merino
parent c1dd7e52d0
commit c59782caef
1 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,8 @@ UserProfileDirective = ($confirm, $auth, $repo) ->
changeEmail = $scope.user.isAttributeModified("email") changeEmail = $scope.user.isAttributeModified("email")
onSuccess = (data) => onSuccess = (data) =>
$auth.setUser($scope.user) user = $model.make_model("users", data)
$auth.setUser(user)
if changeEmail if changeEmail
$confirm.success("<strong>Check your inbox!</strong><br /> $confirm.success("<strong>Check your inbox!</strong><br />
We have sent a mail to your account<br /> We have sent a mail to your account<br />