fix edit user settings

stable
Juanfran 2015-03-12 13:22:30 +01:00
parent 1906abaa1c
commit e3290adf29
1 changed files with 3 additions and 3 deletions

View File

@ -91,8 +91,8 @@ UserProfileDirective = ($confirm, $auth, $repo) ->
changeEmail = $scope.user.isAttributeModified("email") changeEmail = $scope.user.isAttributeModified("email")
onSuccess = (data) => onSuccess = (data) =>
user = $model.make_model("users", data) $auth.setUser(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 />
@ -113,7 +113,7 @@ UserProfileDirective = ($confirm, $auth, $repo) ->
return {link:link} return {link:link}
module.directive("tgUserProfile", ["$tgConfirm", "$tgAuth", "$tgRepo", UserProfileDirective]) module.directive("tgUserProfile", ["$tgConfirm", "$tgAuth", "$tgRepo", UserProfileDirective])
############################################################################# #############################################################################