mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:22:46 +08:00
FIX: Ensure the signup boolean is passed when started via _autoLogin (#12338)
The signup boolean was being passed in the third _autoLogin argument, when it should have been the fourth. The third parameter to _autoLogin was optional, which is confusing. This commit cleans things up so both optional arguments are supplied via keywords.
Followup to cbef2ba151
This commit is contained in:
parent
942e8bac4f
commit
a52a863fc9
|
@ -247,9 +247,9 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
|
|||
const returnPath = encodeURIComponent(window.location.pathname);
|
||||
window.location = getURL("/session/sso?return_path=" + returnPath);
|
||||
} else {
|
||||
this._autoLogin("login", "login-modal", () =>
|
||||
this.controllerFor("login").resetForm()
|
||||
);
|
||||
this._autoLogin("login", "login-modal", {
|
||||
notAuto: () => this.controllerFor("login").resetForm(),
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -262,7 +262,7 @@ const ApplicationRoute = DiscourseRoute.extend(OpenComposer, {
|
|||
}
|
||||
},
|
||||
|
||||
_autoLogin(modal, modalClass, notAuto, { signup = false } = {}) {
|
||||
_autoLogin(modal, modalClass, { notAuto = null, signup = false } = {}) {
|
||||
const methods = findAll();
|
||||
|
||||
if (!this.siteSettings.enable_local_logins && methods.length === 1) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user