Jump to content

Recommended Posts

I have this code:

[code]
<table width="99.9%" bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#C1CAFF" align="center">
<font color="#001A9E" size="1" face="arial">
LOGIN INFORMATION
</font>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<br />
<font size="2">
<?php if ($userdata) { ?>
<?php if ($userdata['session_logged_in']) { ?>
<?php echo phpbb_avatar_image($userdata['user_avatar_type'], $userdata['user_avatar']); ?>
<?php printf($lang['Welcome_subject'], $board_config['sitename']); ?>, <?php echo $userdata['username']; ?>.<br />
<?php printf($lang['You_last_visit'], create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone'])); ?>
<br /><br />
<a href="<?php echo append_sid($phpbb_root_path .'privmsg.php?folder=inbox');?>">
<?php if ($userdata['user_new_privmsg'] == 0) {
echo $lang['No_new_pm']; }
elseif ($userdata['user_new_privmsg'] == 1) {
printf($lang['New_pm'], $userdata['user_new_privmsg']); }
else {
printf($lang['New_pms'], $userdata['user_new_privmsg']); } ?></a><br />
<a href="<?php echo append_sid($phpbb_root_path . 'search.php?search_id=newposts'); ?>"><?php echo $lang['Search_new']; ?> (<?php echo $new_posts['total']; ?>)</a><br />
<a href="<?php echo append_sid($phpbb_root_path . 'search.php?search_id=egosearch'); ?>"><?php echo $lang['Search_your_posts']; ?></a><br />
<a href="<?php echo append_sid($phpbb_root_path . 'search.php?search_id=unanswered'); ?>"><?php echo $lang['Search_unanswered']; ?></a><br />
<?php } else { ?>
<?php printf($lang['Welcome_subject'],
$board_config['sitename']); ?>, <?php echo $lang['Guest']; ?>.
<a href="<?php echo append_sid($phpbb_root_path .
'profile.php?mode=register'); ?>"><?php echo $lang['Register']; ?></a>
<?php } ?>
<?php } ?>
<?php if (!$userdata or !$userdata['session_logged_in']){ ?>
<?php echo $lang['Login']; ?>
<form action="<?php echo $phpbb_root_path; ?>login.php" method="post">
<?php echo $lang['Username']; ?>:<br />
<input type="text" name="username" size="20" maxlength="40" value="" /><br />
<?php echo $lang['Password']; ?>:<br />
<input type="password" name="password" size="20" maxlength="25" /><br />
<input type="checkbox" name="autologin" /> <?php echo $lang['Log_me_in']; ?>
<br />&nbsp;<br />
<?php
  //
  // NOTE: Redirecting to the portal after login works only
  // if the portal.php is within your phpBB2 root folder. If
  // you move the portal.php outside the root folder you will
  // have to change the redirect value by hand. See also
  // http://www.phpbbfetchall.com/docs/redirecting/
  // for further information.
  //
?>
<input type="hidden" name="redirect" value="<?php echo $phpbb_root_path . $PHP_SELF; ?>" />
<input type="hidden" name="sid" value="<?php echo $userdata['session_id']; ?>" />
<input type="hidden" name="outside" value="1" />
<input type="submit" class="mainoption" name="login" value="<?php echo $lang['Login']; ?>" />
<br />
<a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=sendpassword'); ?>">
<?php echo $lang['Forgotten_password']; ?></a>
</form>
<?php } ?>
</font>
<br />
</td>
</tr>
</table>
[/code]

Everything seems to work except when the users logs in from this page, it does not bring them back to this page.  Any Ideas?  This is used from the phpbbfetchall MOD.  This file is indeed inside the root path to the phpBB folder just like the comment says it should be and the root path is defined at the top as

[code]
$phpbb_root+path = './';
[/code]

Everything else works great!

Thanks in advance for any suggestions!
Link to comment
https://forums.phpfreaks.com/topic/31324-login-not-bringing-member-back-to-page/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.