mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: redirect to original URL after social signup
This commit is contained in:
@@ -205,6 +205,11 @@ export default Ember.Controller.extend(
|
||||
"accountChallenge"
|
||||
);
|
||||
const userFields = this.get("userFields");
|
||||
const destinationUrl = this.get("authOptions.destination_url");
|
||||
|
||||
if (!Ember.isEmpty(destinationUrl)) {
|
||||
$.cookie("destination_url", destinationUrl, { path: '/' });
|
||||
}
|
||||
|
||||
// Add the userfields to the data
|
||||
if (!Ember.isEmpty(userFields)) {
|
||||
@@ -255,10 +260,12 @@ export default Ember.Controller.extend(
|
||||
this.get("rejectedPasswords").pushObject(attrs.accountPassword);
|
||||
}
|
||||
this.set("formSubmitted", false);
|
||||
$.cookie("destination_url", null);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
this.set("formSubmitted", false);
|
||||
$.cookie("destination_url", null);
|
||||
return this.flash(I18n.t("create_account.failed"), "error");
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user