fix: 修正重複註冊防呆邏輯
This commit is contained in:
@@ -176,13 +176,13 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||
String password = _passwordController.text;
|
||||
|
||||
var result = await conn.execute(
|
||||
'SELECT * FROM HomeLogin WHERE homeEmail = :email',
|
||||
{'email': email},
|
||||
'SELECT * FROM HomeLogin WHERE homeEmail = :email OR homeName = :name',
|
||||
{'email': email, 'name': name},
|
||||
);
|
||||
|
||||
if (result.rows.isNotEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('註冊失敗:電子信箱已被使用,請嘗試更換電子信箱')),
|
||||
SnackBar(content: Text('註冊失敗:電子信箱或帳號名稱已被使用,請嘗試更換或登入')),
|
||||
);
|
||||
} else {
|
||||
// TODO: Phone Address is setting not null in database, remove it or setting default value
|
||||
|
||||
Reference in New Issue
Block a user