Disable generated user accounts
This commit is contained in:
@@ -134,7 +134,7 @@ public class CustomerService {
|
||||
user.setFullName((customer.getFirstName() + " " + customer.getLastName()).trim());
|
||||
user.setPhone(generatePhone(customer));
|
||||
user.setRole(User.Role.CUSTOMER);
|
||||
user.setActive(true);
|
||||
user.setActive(false);
|
||||
user.setTokenVersion(0);
|
||||
return userRepository.save(user);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ SELECT
|
||||
CONCAT(c.firstName, ' ', c.lastName) AS fullName,
|
||||
CONCAT('200-000-', LPAD(c.customerId, 4, '0')) AS phone,
|
||||
'CUSTOMER' AS role,
|
||||
TRUE AS active,
|
||||
FALSE AS active,
|
||||
0 AS tokenVersion
|
||||
FROM customer c
|
||||
WHERE c.user_id IS NULL
|
||||
@@ -27,7 +27,7 @@ SELECT
|
||||
WHEN UPPER(e.role) = 'MANAGER' THEN 'ADMIN'
|
||||
ELSE 'STAFF'
|
||||
END AS role,
|
||||
TRUE AS active,
|
||||
FALSE AS active,
|
||||
0 AS tokenVersion
|
||||
FROM employee e
|
||||
WHERE e.user_id IS NULL
|
||||
|
||||
Reference in New Issue
Block a user