diff --git a/controllers/account.go b/controllers/account.go index 503c95d5..0ab000b5 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -116,7 +116,7 @@ func (c *ApiController) Signup() { return } - if application.IsSignupItemVisible("Email") && form.Email != "" { + if application.IsSignupItemVisible("Email") && application.GetSignupItemRule("Email") != "No verification" && form.Email != "" { checkResult := object.CheckVerificationCode(form.Email, form.EmailCode) if len(checkResult) != 0 { c.ResponseError(fmt.Sprintf("Email: %s", checkResult)) diff --git a/object/init.go b/object/init.go index e6512e18..72b0c08d 100644 --- a/object/init.go +++ b/object/init.go @@ -109,7 +109,7 @@ func initBuiltInApplication() { {Name: "Display name", Visible: true, Required: true, Prompted: false, Rule: "None"}, {Name: "Password", Visible: true, Required: true, Prompted: false, Rule: "None"}, {Name: "Confirm password", Visible: true, Required: true, Prompted: false, Rule: "None"}, - {Name: "Email", Visible: true, Required: true, Prompted: false, Rule: "None"}, + {Name: "Email", Visible: true, Required: true, Prompted: false, Rule: "Normal"}, {Name: "Phone", Visible: true, Required: true, Prompted: false, Rule: "None"}, {Name: "Agreement", Visible: true, Required: true, Prompted: false, Rule: "None"}, }, diff --git a/web/src/ApplicationListPage.js b/web/src/ApplicationListPage.js index 6ab2d907..9410f8e5 100644 --- a/web/src/ApplicationListPage.js +++ b/web/src/ApplicationListPage.js @@ -43,7 +43,7 @@ class ApplicationListPage extends BaseListPage { {name: "Display name", visible: true, required: true, rule: "None"}, {name: "Password", visible: true, required: true, rule: "None"}, {name: "Confirm password", visible: true, required: true, rule: "None"}, - {name: "Email", visible: true, required: true, rule: "None"}, + {name: "Email", visible: true, required: true, rule: "Normal"}, {name: "Phone", visible: true, required: true, rule: "None"}, {name: "Agreement", visible: true, required: true, rule: "None"}, ], diff --git a/web/src/SignupTable.js b/web/src/SignupTable.js index 468e118e..3f1d99e5 100644 --- a/web/src/SignupTable.js +++ b/web/src/SignupTable.js @@ -159,7 +159,7 @@ class SignupTable extends React.Component { title: i18next.t("provider:rule"), dataIndex: 'rule', key: 'rule', - width: '120px', + width: '155px', render: (text, record, index) => { let options = []; if (record.name === "ID") { @@ -167,12 +167,17 @@ class SignupTable extends React.Component { {id: 'Random', name: 'Random'}, {id: 'Incremental', name: 'Incremental'}, ]; - } if (record.name === "Display name") { + } else if (record.name === "Display name") { options = [ {id: 'None', name: 'None'}, {id: 'Real name', name: 'Real name'}, {id: 'First, last', name: 'First, last'}, ]; + } else if (record.name === "Email") { + options = [ + {id: 'Normal', name: 'Normal'}, + {id: 'No Verification', name: 'No verification'}, + ]; } if (options.length === 0) { diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index 5c4ddab2..ec322f92 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -325,20 +325,23 @@ class SignupPage extends React.Component { > this.setState({email: e.target.value})} /> -