This text is replaced by the Flash movie.

CMSMS FrontEnd User Hack…

CMSMS FrontEnd User Hack for Automatic Login
The following step by step method I did Integrating CMSMS and amember for automatic login

Current Version of FrontEndUsers plugin is 1.5.2
CMSMS Version 1.4.1

For Session - I used

    $_SESSION['fe_user_logged_in'] //- just passing a non sense string :) not important.
    $_SESSION['fe_int_username'] //- passing username value
    $_SESSION['fe_int_password'] //- passing password value

Note: I used Custom Session variables, cause on my current project I used 4 different apps to pass this session variables... If you are only integrating cmsms on amember, I advice that you get the session of amember username and password.


Front End User Login

1.)at [index.php] root of cmsms
add session_start(); at the beginning

over modules folder find
FrontEndUsers folder

2.)Injecting the Sessions

on - [action.do_login.php]

find (could be) on line 80:

     $this->Audit( 0, $this->Lang('friendlyname'),
     $this->Lang('frontenduser_loggedin').": ".$params['feu_input_username'] );

     // we're logged in

put these following code at bottom of it:

     /* Custom Login Session */
     $_SESSION['fe_user_logged_in'] = "logged_in"; // store session data
     $_SESSION['fe_int_username'] = $params['feu_input_username']; //username
     $_SESSION['fe_int_password'] = $params['feu_input_password']; //password

3.)Erasing the Session

on - [action.logout.php]

find (could be) on line 53:

     $this->SendEvent( 'OnLogout', $parms );

     // we're logged out
     // redirect somewhere
     // todo, add more options here.

put these following code at bottom of it:

     /* Custom Logout Session */
     $_SESSION['fe_user_logged_in'] = NULL; // store session data as NULL
     $_SESSION['fe_int_username'] = NULL;
     $_SESSION['fe_int_password'] = NULL;

4.)This is not necessary but if you want to custom design or name on your login boxes you can edit the hard code at:


Like in this case I added some javascript on input boxes and also changed the class style.

        $this->CreateInputText( $id, 'feu_input_username',

    $smarty->assign('input_label', $id );
    $smarty->assign('prompt_password', $this->Lang('prompt_password'));

    $smarty->assign('input_password', '<input type="password" name = "' .$id.  'feu_input_password" class="passwordfield"

    onfocus="\'none\'" onblur="if(this.value==\'\'){\'url(images/login-password.gif)\'}" />');


Tags: ,

Leave a Reply