[geeklog-cvs] geeklog-1.3/system lib-user.php,1.5,1.6

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Wed Aug 11 14:30:41 EDT 2004


Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv12432/system

Modified Files:
	lib-user.php 
Log Message:
Integrated the "welcome email hack": If the file 'welcome_email.txt' exists in the 'data' directory, the contents of that file are sent out as the welcome email to new users.


Index: lib-user.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-user.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** lib-user.php	9 Aug 2004 07:56:22 -0000	1.5
--- lib-user.php	11 Aug 2004 18:30:35 -0000	1.6
***************
*** 165,174 ****
      DB_change ($_TABLES['users'], 'passwd', "$passwd2", 'username', $username);
  
!     $mailtext = $LANG04[15] . "\n\n";
!     $mailtext .= $LANG04[2] . ": $username\n";
!     $mailtext .= $LANG04[4] . ": $passwd\n\n";
!     $mailtext .= $LANG04[14] . "\n\n";
!     $mailtext .= $_CONF['site_name'] . "\n";
!     $mailtext .= $_CONF['site_url'] . "\n";
      $subject = $_CONF['site_name'] . ': ' . $LANG04[16];
  
--- 165,192 ----
      DB_change ($_TABLES['users'], 'passwd', "$passwd2", 'username', $username);
  
!     if (file_exists ($_CONF['path_data'] . 'welcome_email.txt')) {
!         $template = new Template ($_CONF['path_data']);
!         $template->set_file (array ('mail' => 'welcome_email.txt'));
!         $template->set_var ('auth_info',
!                             "$LANG04[2]: $username\n$LANG04[4]: $passwd");
!         $template->set_var ('site_url', $_CONF['site_url']);
!         $template->set_var ('site_name', $_CONF['site_name']);
!         $template->set_var ('site_slogan', $_CONF['site_slogan']);
!         $template->set_var ('lang_text1', $LANG04[15]);
!         $template->set_var ('lang_text2', $LANG04[14]);
!         $template->set_var ('lang_username', $LANG04[2]);
!         $template->set_var ('lang_password', $LANG04[4]);
!         $template->set_var ('username', $username);
!         $template->set_var ('password', $passwd);
!         $template->parse ('output', 'mail');
!         $mailtext = $template->get_var ('output');
!     } else {
!         $mailtext = $LANG04[15] . "\n\n";
!         $mailtext .= $LANG04[2] . ": $username\n";
!         $mailtext .= $LANG04[4] . ": $passwd\n\n";
!         $mailtext .= $LANG04[14] . "\n\n";
!         $mailtext .= $_CONF['site_name'] . "\n";
!         $mailtext .= $_CONF['site_url'] . "\n";
!     }
      $subject = $_CONF['site_name'] . ': ' . $LANG04[16];
  




More information about the geeklog-cvs mailing list