-
-
Save andrewwatson/1854021 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// models/User.php | |
/** | |
* Check if the user used the domain prefix | |
* to login. If they did pass param through | |
* unchanged. If they didn't, prepend it and | |
* return it. | |
* @param string $username | |
* @return string | |
*/ | |
protected function checkUsername(string $username) | |
{ | |
if (!substr($username, 0, 4) == "DOM\\") | |
{ | |
$username = "DOM\\" . $username | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment