[geeklog-cvs] geeklog-1.3/public_html/admin user.php,1.62,1.63

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Sun Sep 7 14:51:43 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin
In directory geeklog_prod:/tmp/cvs-serv22299

Modified Files:
	user.php 
Log Message:
Display a proper error message when a new user is created (or an existing user account is changed) with an email address that already exists (thus closing bug #24). Also added a test to see if it's a valid email address.


Index: user.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/user.php,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** user.php	1 Sep 2003 19:01:06 -0000	1.62
--- user.php	7 Sep 2003 18:51:41 -0000	1.63
***************
*** 64,68 ****
  function edituser($uid = '', $msg = '') 
  {
!     global $_TABLES, $LANG28, $_CONF, $LANG_ACCESS, $_USER;
  
      $retval = '';
--- 64,68 ----
  function edituser($uid = '', $msg = '') 
  {
!     global $_CONF, $_TABLES, $_USER, $LANG28, $LANG_ACCESS, $MESSAGE;
  
      $retval = '';
***************
*** 71,75 ****
          $retval .= COM_startBlock ($LANG28[22], '',
                             COM_getBlockTemplate ('_msg_block', 'header'))
!                 . $LANG28[$msg]
                  . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
      }
--- 71,75 ----
          $retval .= COM_startBlock ($LANG28[22], '',
                             COM_getBlockTemplate ('_msg_block', 'header'))
!                 . $MESSAGE[$msg]
                  . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
      }
***************
*** 223,227 ****
          if ($ucount > 0) {
              // Admin just changed a user's username to one that already exists
!             return edituser ($uid, 21);
          }
  
--- 223,231 ----
          if ($ucount > 0) {
              // Admin just changed a user's username to one that already exists
!             return edituser ($uid, 51);
!         }
! 
!         if (!COM_isEmail ($email)) {
!             return edituser ($uid, 52);
          }
  
***************
*** 230,234 ****
          if ($ucount > 0) {
              // Admin just changed a user's email to one that already exists
!             return edituser ($uid, 21);
          }
  
--- 234,238 ----
          if ($ucount > 0) {
              // Admin just changed a user's email to one that already exists
!             return edituser ($uid, 56);
          }
  





More information about the geeklog-cvs mailing list