Sunday, August 4, 2013

My answer to "Error when requesting password after joining with oAuth"

This is my answer to a Question on Support site for LampCMS project


I think it may be better to just allow underscores and dots in username so these created usernames will validate.

Try to make username() function in Lampcms\Validate look like this, let me know if this will allow underscores and dots in generated usernames.

public static function username($string)
    {
        d('$string: ' . $string);
        $ret = (0 !== \preg_match('/([a-zA-Z0-9@])([a-zA-Z0-9\-_.]{1,18})([a-zA-Z0-9])$/A', $string, $m));

        d('ret ' . $ret);

        return $ret;
    }


No comments:

Post a Comment