[ZendTo] Re: Strip domain from login

Jules Jules at Zend.To
Sat Sep 17 14:43:14 BST 2011


And of course you need to change the definition of usernameRegexp in 
config/preferences.php to
   'usernameRegexp'    => '/^([a-zA-Z0-9][a-zA-Z0-9\_\.\-\@\\\]*)$/i',

And yes, I have added *3* "\" characters near the end of that string, 
not 2 as you might think.

That way it's done in the code, so you don't have to change your 
templates in 2 different places.

This will be in the next release.

Jules.

On 17/09/2011 14:33, Jules wrote:
> The only snag with that implementation is that if they are logging in 
> from a LocalIP (i.e. somewhere on your site), that won't fix it when 
> they login with the little "dropdown" login box, only if they actually 
> go to the full login form.
>
> I've added a couple of lines to NSSADAuthenticator.php to say this:
>     $uname = preg_replace('/@.*$/', '', $uname);
>     $uname = preg_replace('/^.*\\\/', '', $uname);
> where previously it just said
>     $uname = preg_replace('/@.*$/', '', $uname);
> (that occurs twice in NSSADAuthenticator.php).
>
> On 17/09/2011 11:19, --[ UxBoD ]-- wrote:
>> Jules, please ignore this request as all that is required is JS magic 
>> in login.tpl:
>>
>> <script type="text/javascript">
>>           bindEnter($('#passwordField'), function(){ submitform() });
>>           function submitform() {
>>              var uname = document.forms["login"].uname.value;
>>              document.forms["login"].uname.value = 
>> uname.substring(uname.indexOf("\\")+1);
>>              document.login.submit(); }
>> </script>
>> -- 
>> Thanks, Phil
>>
>> ------------------------------------------------------------------------
>>
>>     Jules, a number of our test users have commented that it would be
>>     great if they were able to specify the same sign on credentials
>>     as they do for other systems. What is the difference you may ask?
>>     Well all other systems require DOMAIN\USERID and they are looking
>>     for consistency. They believe when rolled out there will be a lot
>>     of login failures as people will try to use the later format. How
>>     feasible would it be to add a parse routine to the code to strip
>>     the slash and domain from the login credentials ?
>>     -- 
>>     Thanks, Phil
>>
>>
>>     _______________________________________________
>>     ZendTo mailing list
>>     ZendTo at zend.to
>>     http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>>
>>
>>
>>
>> _______________________________________________
>> ZendTo mailing list
>> ZendTo at zend.to
>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto
>
> Jules
>
> -- 
> Julian Field MEng CITP CEng
> www.Zend.To
>
> Follow me at twitter.com/JulesFM
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>
> 'Teach a man to reason, and he will think for a lifetime.' - Phil Plait
> 'All programs have a desire to be useful' - Tron, 1982
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng CITP CEng
www.Zend.To

Follow me at twitter.com/JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

'Teach a man to reason, and he will think for a lifetime.' - Phil Plait
'All programs have a desire to be useful' - Tron, 1982

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20110917/8ff97de2/attachment.html 


More information about the ZendTo mailing list