Fix: Resolve Username Case Sensitivity Issue in Login Flow (#1070)
* Fix: Username changing The only situation where the username must be unique is when changing the username. * Update UserController.java
This commit is contained in:
@@ -95,7 +95,7 @@ public class AccountWebController {
|
||||
|
||||
// Fetch user details from the database
|
||||
Optional<User> user =
|
||||
userRepository.findByUsername(
|
||||
userRepository.findByUsernameIgnoreCase(
|
||||
username); // Assuming findByUsername method exists
|
||||
if (!user.isPresent()) {
|
||||
// Handle error appropriately
|
||||
@@ -145,7 +145,7 @@ public class AccountWebController {
|
||||
|
||||
// Fetch user details from the database
|
||||
Optional<User> user =
|
||||
userRepository.findByUsername(
|
||||
userRepository.findByUsernameIgnoreCase(
|
||||
username); // Assuming findByUsername method exists
|
||||
if (!user.isPresent()) {
|
||||
// Handle error appropriately
|
||||
|
||||
Reference in New Issue
Block a user