private function buildUsernameWhere($username)
    {
        $userClass = $this->auth->getUserClass();

        $conditions = array_map(
            function ($prop, $username) { return $prop." = '".$username."'"; },
            $userClass::$usernameProperties,
            array_fill(0, count($userClass::$usernameProperties),
            addslashes($username)));

        return '('.implode(' OR ', $conditions).')';
    }