forked from baron/baron-sso
비밀번호 로그인 +82 후처리 추가
This commit is contained in:
@@ -108,12 +108,28 @@ class _CreateUserScreenState extends State<CreateUserScreen> {
|
||||
|
||||
setState(() => _isLoading = true);
|
||||
|
||||
String loginId = _loginIdController.text.trim();
|
||||
if (!loginId.contains('@')) {
|
||||
loginId = loginId.replaceAll(RegExp(r'[-\s]'), '');
|
||||
if (loginId.startsWith('010')) {
|
||||
loginId = '+82${loginId.substring(1)}';
|
||||
}
|
||||
}
|
||||
|
||||
String? phone = _phoneController.text.trim().isEmpty ? null : _phoneController.text.trim();
|
||||
if (phone != null && !phone.contains('@')) {
|
||||
phone = phone.replaceAll(RegExp(r'[-\s]'), '');
|
||||
if (phone.startsWith('010')) {
|
||||
phone = '+82${phone.substring(1)}';
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
await AuthProxyService.createUser(
|
||||
loginId: _loginIdController.text.trim(),
|
||||
loginId: loginId,
|
||||
adminPassword: _verifiedAdminPassword!,
|
||||
email: _emailController.text.trim().isEmpty ? null : _emailController.text.trim(),
|
||||
phone: _phoneController.text.trim().isEmpty ? null : _phoneController.text.trim(),
|
||||
phone: phone,
|
||||
displayName: _nameController.text.trim().isEmpty ? null : _nameController.text.trim(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user