Skip to content

Commit 54925ea

Browse files
on signup page, don't check for email exist without submitting form in enterprise mode
1 parent 186e330 commit 54925ea

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

client/packages/lowcoder/src/api/subscriptionApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export const searchCustomersSubscriptions = async (Customer: LowcoderSearchCusto
140140
}
141141

142142
// Filter out entries with `"success": "false"`
143-
const validEntries = result.data.filter((entry: any) => entry.success !== "false");
143+
const validEntries = result.data?.filter((entry: any) => entry.success !== "false");
144144

145145
// Flatten the data arrays and filter out duplicates by `id`
146146
const uniqueSubscriptions = Object.values(

client/packages/lowcoder/src/pages/userAuth/formLoginSteps.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ export default function FormLoginSteps(props: FormLoginProps) {
156156
}, [serverSettings]);
157157

158158
const afterLoginSuccess = () => {
159-
if (props.organizationId) {
159+
// used invitation link or organization login url then set cookie
160+
if (props.organizationId && !isEnterpriseMode) {
160161
localStorage.setItem("lowcoder_login_orgId", props.organizationId);
161162
}
162163
fetchUserAfterAuthSuccess?.();

client/packages/lowcoder/src/pages/userAuth/register.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ function UserRegister() {
136136
}, [serverSettings]);
137137

138138
const afterLoginSuccess = () => {
139-
if (organizationId) {
139+
// used invitation link or organization login url then set cookie
140+
if (organizationId && !isEnterpriseMode) {
140141
localStorage.setItem("lowcoder_login_orgId", organizationId);
141142
}
142143
fetchUserAfterAuthSuccess?.();
@@ -159,7 +160,7 @@ function UserRegister() {
159160
);
160161

161162
const checkEmailExist = () => {
162-
if (!Boolean(account.length) || lastEmailChecked === account) return;
163+
if (!Boolean(account.length) || lastEmailChecked === account || isEnterpriseMode) return;
163164

164165
setOrgLoading(true);
165166
OrgApi.fetchOrgsByEmail(account)

0 commit comments

Comments
 (0)