Username - case in-sensitive first letter?

Hi community,

I implemented Nextcloud and E-Mail server with help of the tutorial “Caramel Edition” by and it works fine. But one small thing is to make the login more comfortable (and less secure I know). I want the first letter of the username case-insensitive, that Peter and peter can login as the same user. In the database all names are stored in lowercase letters. I already changed the SQL statements of “User Backend Using Raw SQL” that the login works with Peter and peter, that’s not the problem, but I guess afterwards the variable :username contains the value Peter and this is another user like peter for Nextcloud. Is there a way for me to solve this issue, to manipulate :username?

Thank you and kind regards

I think, you would need to add a SQL function like LOWERCASE() around :username in all queries that use it. Then Nextcloud would use the lower case version internally but would accept all username iterations like Peter, Peter, PeTeR. I haven’t tested this, so maybe I am missing something.