Maybe something like:

def check_username(form):
    if not form.vars.username.endswith('R')
        form.errors.username = 'Invalid username'

auth.settings.login_onvalidation = [check_username]

Anthony

On Thursday, March 29, 2012 2:09:44 PM UTC-4, Detectedstealth wrote:
>
> Hi,
>
> I need to be able to add a character to the end of a username that can be 
> changed by us. This character is not actually stored in the database for 
> the username however it must be entered for the username to validate.
>
> For example:
> username: 0000012 -> is stored in the database
>
> Login with: 0000012 would fail
> Login with: 0000012R would succeed
>
> This is a business requirement so even if I don't like this idea I still 
> need to program it. How to make this work with the current login system? Is 
> there a way to capture the form submit before the handler actually 
> processes it, pull the last character if it is valid pass the username 
> without the character to the real login validator?
>
> -- 
> -- 
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.warplydesigned.com
> http://www.fitnessfriendsfinder.com
>  

Reply via email to