Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Direct user to a page other than "my account" afte
  • Posted: 16.05.2004, 03:11
     
    rwoody
    rank:
    Softmore Softmore
    registered:
     May 2003
    Status:
    offline
    last visit:
    02.06.04
    Posts:
    74
    Where can I change the code to direct the user back to the index.php vs going to "My account" on login. This page will not be available to the users on my site, so I need them to be directed back to the home page after login.

    Any suggestions?


    Ruth in AZ
  • Posted: 16.05.2004, 04:32
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423
    ..the login block has code that will return the user from where they came..
    ..otherwise you can use something like this within your login form:

    Code

    echo "<input type="hidden" name="url" value="index.php" />";


    -IR

    --
    http://www.invalidresponse.com
  • Posted: 16.05.2004, 05:42
     
    rwoody
    rank:
    Softmore Softmore
    registered:
     May 2003
    Status:
    offline
    last visit:
    02.06.04
    Posts:
    74
    First of all thanks so much for you immediate reply.

    This is the code from my login screen - I want to make sure I understand your correctly - I get the following error message

    Parse error: parse error, unexpected T_ECHO in /home/singles/public_html/test/main/modules/NS-User/user.php on line 333

    Are you stating replace:

    the following code

    "<input type="\"hidden\"" name="\"url\"" value="\""" />\n";


    Replace with This?

    echo "<input type="hidden" name="url" value="index.php" />";

    The current code in its entirety:


    function user_user_loginscreen()
    {
    include 'header.php';
    OpenTable();
    echo "<form action="\"user.php\"" method="\"post\"">\n" . "<font class="\"pn-title\"">" . _USERLOGIN . "

    \n" . "\n" . "\n";
    if (pnConfigGetVar('seclevel') != 'High') {
    echo "\n";
    }
    echo "
    \n" . "<font class="\"pn-normal\"">" . _NICKNAME . ": <input type="\"text\"" name="\"uname\"" size="\"26\"" maxlength="\"25\"" />
    <font class="\"pn-normal\"">" . _PASSWORD . ": <input type="\"password\"" name="\"pass\"" size="\"21\"" maxlength="\"20\"" />
    <font class="\"pn-normal\"">" . _REMEMBERME . ": <input type="\"checkbox\"" name="\"rememberme\"" />
    \n" . "<input type="\"hidden\"" name="\"url\"" value="\""" />\n";
    user_submit('NS-User', 'login', _LOGIN);
    echo "</form>\n";
    CloseTable();

    Thanks so much for your help.

    Ruth in AZ
  • Posted: 16.05.2004, 06:18
     
    InvalidResponse
    rank:
    Professional Professional
    registered:
     September 2003
    Status:
    offline
    last visit:
    21.10.07
    Posts:
    2423
    ..you got it Ruth.. :)

    just change:

    value=\"" . getenv("HTTP_REFERER") . "\"

    to:

    value=\"index.php\"

    -IR

    --
    http://www.invalidresponse.com
  • Posted: 18.05.2004, 04:37
     
    rwoody
    rank:
    Softmore Softmore
    registered:
     May 2003
    Status:
    offline
    last visit:
    02.06.04
    Posts:
    74
    That didn't work either, but this did

    "<input type="\"hidden\"" name="\"url\"" value="index.php" />";

    Thanks for putting me on the right path

    Ruth in AZ

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula