[sork] Small patch for locking username (Passwd)

Patrick Boutilier boutilpj at ednet.ns.ca
Fri Feb 21 13:52:57 PST 2003


Attached is a small patch to allow you to make the username unchangeable 
by the user when they go to change their password. This patch can 
probably be cleaned up but it is a start. :-)

You also need to add this line to conf.php :

$conf['username']['change'] = false;

-------------- next part --------------
*** passwd/templates/main/main.inc	2003-02-21 13:03:20.000000000 -0400
--- passwd.CVS/templates/main/main.inc	2003-01-20 21:28:36.000000000 -0400
*************** if (isset($conf['password']['maxlength']
*** 37,47 ****
  
  <tr>
    <td class="light" align="right"><b><?php echo _("Username:") ?></b></td>
!   <?php if ($conf['username']['change'] == 'true') : ?>
! 	  <td><input type="text" name="userid" value="<?php echo $userid ?>"></td>
!   <?php else : ?>
! 	  <td><input readonly type="text" name="userid" value="<?php echo $userid ?>"></td>
!   <?php endif; ?>
    <td width="15"><?php echo ($conf['user']['online_help'] && $browser->hasFeature('javascript')) ? Help::link('passwd', 'passwd-username') : '&nbsp;' ?></td>
  </tr>
  
--- 37,43 ----
  
  <tr>
    <td class="light" align="right"><b><?php echo _("Username:") ?></b></td>
!   <td><input type="text" name="userid" value="<?php echo $userid ?>"></td>
    <td width="15"><?php echo ($conf['user']['online_help'] && $browser->hasFeature('javascript')) ? Help::link('passwd', 'passwd-username') : '&nbsp;' ?></td>
  </tr>
  


More information about the sork mailing list