I’m sorry I haven’t answered for so long, but I’ve been busy a lot and haven’t been able to address this issue until now.
First i only got the login of the FOG local users to work with the solution provided by @Tom-Elliott.
I could login with usernames the contain spaces with the following changes:
user.class.php:
Line 214:
Change the relevant regex from:
(?=^.{3,40}$)^[\w][\w0-9]*[._-]?[\w0-9]*[._-]?[\w0-9]+$
to:
(?=^.{3,40}$)^[\w][\w0-9]*[ ._-]?[\w0-9]*[ ._-]?[\w0-9]+$
fog.user.js
Comment out:
//regex: /^[\w][\w0-9]*[._-]?[\w0-9]*[.]?[\w0-9]+$/
When i tried to login with a domain user that contains spaces (users without spaces worked already) i got the same problem, no error but no login.
Then i figured out that the LDAP plugin uses the same check and regex so i had to edit this too:
ldap.class.php
Comment out:
/**
* Test the username for funky characters and return
* immediately if found.
*/
// $test = preg_match(
// '/(?=^.{3,40}$)^[\w][\w0-9]*[._-]?[\w0-9]*[.]?[\w0-9]+$/i',
// $user
// );
// if (!$test) {
// return false;
// }
Now it works like a charm. 😃
Thanks to all people that were involved in this.
This can be marked as solved.