Username format?

Hello

My NextCloud system is using Samba backend, which allows different username formats - ‘user@domain.com’ and ‘user’. NextCloud recognizes these as two different users. Is the a way to allow both forms of username and then collapse to single/same username, i.e. user@domain.com -> user?

Thank you

Hi,
I ended up patching LoginController.php file:

- name: patch LoginController.php
  lineinfile:
    path: /var/www/html/nextcloud/core/Controller/LoginController.php
    insertafter: '^(.*)public function tryLogin'
    line: 'if(strpos($user, "@")) {$user = substr($user,0, strpos($user, "@"));}'