Author Topic: After user login to his/her account goes to his/her profile page  (Read 6115 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladec

  • Newbie
  • *
  • Posts: 12
    • View Profile
After user login to his/her account goes to his/her profile page
« on: November 08, 2006, 11:12:13 AM »
After user login to his/her account, is it possible, that instead of a homepage, he will be redirected to profile page?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: After user login to his/her account goes to his/her profile page
« Reply #1 on: November 08, 2006, 12:26:44 PM »
... edit the following lines in your login.php for your needs ...
Code: [Select]
...
header("Location: ".$site_sess->url($url, "&"));
...
header("Location: ".$site_sess->url(ROOT_PATH."index.php", "&"));
...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Romson

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: After user login to his/her account goes to his/her profile page
« Reply #2 on: December 07, 2006, 04:28:38 PM »
hi, i need the same thing

thats my login.php:

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.4                                                *
 *                                                                        *
 *    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;

  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);
}
?>

my problem is that i dont know how to add the user_id to the redirect ?

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: After user login to his/her account goes to his/her profile page
« Reply #3 on: January 20, 2007, 06:43:12 PM »
Change

Quote
redirect("index.php");

to

Quote
redirect("member.php?action=editprofile");
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline Romson

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: After user login to his/her account goes to his/her profile page
« Reply #4 on: January 25, 2007, 10:17:32 PM »
danke
werde es ausprobieren

Offline m.a

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
Re: After user login to his/her account goes to his/her profile page
« Reply #5 on: January 29, 2007, 12:56:39 AM »
Hi,
funktioniert! Sehr gut  :thumbup:

Aber ich glaube, dass es so logisch und richtiger ist, dass man wo landen soll, wo man gerade sich befindet und da ist!
Wenn es uberhaupt um Login geht!

Best Regards
m.a