ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Member Profile Login Customization

June 21, 2011 5:19pm

Subscribe [4]
  • #1 / Jun 21, 2011 5:19pm

    JohnGribben

    111 posts

    Hi,

    Recently I made a custom member profile theme for a project (copying the default directory and modifying).  I need to to make another change, and I am having a brain freeze as the location of the “member_manager” include file.  I mean the file that contains the login page.  It doesn’t appear to be accessible through the Member Profile Templates page.  I vaguely remember editing some file in the system folder for this, but I can’t find it.

    Also: we are working on a portal which requires visitors to log in. Some of them will be following links to articles and will be redirected to the login page.  Is there a way to save the url of the page they were seeking in a session variable so they will be redirected to the page they were looking for after the login?  I tried using the Twomile Login Redirect extension, but I couldn’t get it to install.  It seems to be kind of old, and I figured it was incompatible with my version:

    2.1.4
    Build: 20110411

    Thanks,
    John

  • #2 / Jun 21, 2011 5:59pm

    ikiro

    18 posts

    Hi john,

    You can use a hardcoded login form and use segments to set the url you want them to redirect after they login. See the hidden field for the RET value. Something like:

    <form id="login_form" name="login_form" method="post" action="http://www.mydomain.com/"  enctype="multipart/form-data" >
    <div class="hiddenFields">
    <input type="hidden" name="XID" value="{XID_HASH}" />
    <input type="hidden" name="ACT" value="13" />
    <input type="hidden" name="RET" id="RET" value="http://www.mydomain.com/{segment_1}/{segment_2}/" />
    <input type="hidden" name="site_id" value="1" />
    <input type="hidden" name="anon" value="1" />
    </div>
    <label for="username">Username:</label>
    <input type="text" name="username" id="username" maxlength="255" class="input-login" tabindex="1">
    <label for="password">Passwort:</label>
    <input type="password" name="password" id="password" maxlength="32" class="input-login" tabindex="2">
    <button name="submit_login" id="submit_login" type="submit" tabindex="3">Login</button>
    </form>

    Succes!

    Ralf

  • #3 / Jun 22, 2011 5:33am

    John Henry Donovan

    12339 posts

    Does Ralf’s advice help John?

  • #4 / Jun 22, 2011 9:46am

    JohnGribben

    111 posts

    Thanks for your reply Ralf.  I think we are looking for something else though.  We need to capture the URL the user was seeking prior to being dumped on the login page.  This functionality exists in the EE control panel: when my session times out, and I need to re-login, I am redirected to the page I was working on.

    As to editing the login screen on the profile template, I am really embarrassed to say that this was something I did for this project before, but I can’t remember the location of the file I edited.  I asked for help on this topic in this post:

    http://ellislab.com/forums/viewthread/187446/

    Bad news & good news: the bad is that I am getting old and losing my memory; the good is that we are selling tons of EE sites and I worked through the weekend on one and my brain is just very tired.

  • #5 / Jun 22, 2011 11:09am

    JohnGribben

    111 posts

    Duh.  I found it!  Ralf, you were right—I had hard-coded the login form in a snippet.  Geeze.

    Thanks for your help Ralf!

    I am, however, still searching for the dynamic redirect feature.

  • #6 / Jun 22, 2011 12:18pm

    ikiro

    18 posts

    Hi John,

    You can use cookies or sessions if you do not want to use the segment vars. We’ve done it on a site with EE1. See code. In the development guide you can find the info to port it to EE2.

    Ralf

    <?php
    // Set cookie 
    global $IN, $FNS; $link_id = $IN->QSTR; $FNS->set_cookie('listing_link', $IN->QSTR, 3600); ?>
    
    <?php 
    // Read cookie
    global $IN, $GBL; $listing_url = $IN->GBL('listing_link', 'COOKIE'); 
    ?>
  • #7 / Jun 23, 2011 3:37pm

    Brandon Jones

    5500 posts

    Thanks Ralf!

    John, as we’re in custom code territory here I’ll move this over to Community Help for further conversation. Some good info in this thread. Thanks all!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases