Author Topic: what variable is the user's e-mail address?  (Read 2405 times)

0 Members and 1 Guest are viewing this topic.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
what variable is the user's e-mail address?
« on: May 30, 2008, 02:51:28 AM »
I am working with the login.php in the root directory and I am trying to see how I retrieve the user's e-mail address as they are loggin in. No, not having them type it in, I mean pulling the e-mail from the database as they are logging in.
I am adding to the script so the user will also log into another part of my site at the same time but that side needs thier e-mail address also during its login.
I have tried
$test= $user_email;
$test= user_info['user_email'];

and a few others and they all respond with a empty field.

the commented  area is where I am trying to add my hack for the other part of my site...

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: login.php                                            *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

$main_template 0;

$nozip 1;
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');

$error 0;
if (
$user_info['user_level'] != GUEST || empty($HTTP_POST_VARS['user_name']) || empty($HTTP_POST_VARS['user_password'])) {
  if (!
ereg("index.php"$url) && !ereg("login.php"$url) && !ereg("register.php"$url) && !ereg("member.php"$url)) {
    
redirect($url);
  }
  else {
    
redirect("index.php");
  }
}
else {
  
$user_name trim($HTTP_POST_VARS['user_name']);
  
$user_password trim($HTTP_POST_VARS['user_password']);
  
$auto_login = (isset($HTTP_POST_VARS['auto_login']) && $HTTP_POST_VARS['auto_login'] == 1) ? 0;
//***************
//***************
//***************
//***************
//my hacking attempt
  
$test_email $user__field['user_email'].'help';
  echo 
'USER E-MAIL:'.$test_email;
  exit;
//above prints the e-mail and then stops the program so I can see if it is there or not
//*************
//***********
//********
//********
//*********
if ($site_sess->login($user_name$user_password$auto_login)) {
    if (!
ereg("index.php"$url) && !ereg("login.php"$url) && !ereg("register.php"$url) && !ereg("member.php"$url)) {
      
redirect($url);
    }
    else {
      
redirect("index.php");
    }
  }
  else {
    
$error $lang['invalid_login'];
  }
}
if (
$error) {
  
$main_template "error";
  include(
ROOT_PATH.'includes/page_header.php');
  
show_error_page($error);
}
?>

any help would be great!
Buddy Duke
Buddy Duke
www.budduke.com