Now anonymous users can confirm the change of email even if they are not authenticated, some users update the email from a desktop browser but check the email from mobile
parent
d29fa9efe5
commit
c231bb7575
|
@ -474,9 +474,12 @@ ChangeEmailDirective = ($repo, $model, $auth, $confirm, $location, $params, $nav
|
|||
form = $el.find("form").checksley()
|
||||
|
||||
onSuccessSubmit = (response) ->
|
||||
if $auth.isAuthenticated()
|
||||
$repo.queryOne("users", $auth.getUser().id).then (data) =>
|
||||
$auth.setUser(data)
|
||||
$location.path($navUrls.resolve("home"))
|
||||
else
|
||||
$location.path($navUrls.resolve("login"))
|
||||
|
||||
text = $translate.instant("CHANGE_EMAIL_FORM.SUCCESS")
|
||||
$confirm.success(text)
|
||||
|
|
Loading…
Reference in New Issue