plugins/SpecialUserFuncs.php
changeset 271 f088805540ae
parent 266 917dcc6c4ceb
parent 270 5bcdee999015
child 304 e2cb5f1432c8
equal deleted inserted replaced
266:917dcc6c4ceb 271:f088805540ae
   818             
   818             
   819             // Username
   819             // Username
   820             if(!namegood && ( field.name == 'username' || field.name == '_nil' ) ) 
   820             if(!namegood && ( field.name == 'username' || field.name == '_nil' ) ) 
   821             {
   821             {
   822               //if(frm.username.value.match(/^([A-z0-9 \!@\-\(\)]+){2,}$/ig))
   822               //if(frm.username.value.match(/^([A-z0-9 \!@\-\(\)]+){2,}$/ig))
   823               var regex = new RegExp('^([^<>_&\?]+){2,}$', 'ig');
   823               var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
   824               if ( frm.username.value.match(regex) )
   824               if ( frm.username.value.match(regex) )
   825               {
   825               {
   826                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   826                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   827                 document.getElementById('e_username').innerHTML = '&nbsp;';
   827                 document.getElementById('e_username').innerHTML = '&nbsp;';
   828               } else {
   828               } else {
   883           {
   883           {
   884             var frm = document.forms.regform;
   884             var frm = document.forms.regform;
   885             
   885             
   886             if(!namegood)
   886             if(!namegood)
   887             {
   887             {
   888               <?php
   888               var regex = new RegExp('^([^<>&\?]+){2,}$', 'ig');
   889               // sorry for this ugly hack but jedit gets f***ed otherwise
   889               if ( frm.username.value.match(regex) )
   890               echo 'if(frm.username.value.match(/^([A-z0-9 \.:\!@\#\*]+){2,}$/ig))';
       
   891               ?>
       
   892               {
   890               {
   893                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   891                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/unknown.gif';
   894                 document.getElementById('e_username').innerHTML = '&nbsp;';
   892                 document.getElementById('e_username').innerHTML = '&nbsp;';
   895               } else {
   893               } else {
   896                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/bad.gif';
   894                 document.getElementById('s_username').src='<?php echo scriptPath; ?>/images/bad.gif';