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
CMSMS
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
//
/* 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
session_write_close();
on - [action.logout.php]
find (could be) on line 53:
$this->SendEvent( 'OnLogout', $parms );
$this->_SendNotificationEmail('OnLogout',$parms);
// we're logged out
// redirect somewhere
// todo, add more options here.
/* Custom Logout Session */
$_SESSION['fe_user_logged_in'] = NULL; // store session data as NULL
$_SESSION['fe_int_username'] = NULL;
$_SESSION['fe_int_password'] = NULL;
session_write_close();
[function.user_loginform.php]
Like in this case I added some javascript on input boxes and also changed the class style.
/*
$smarty->assign('input_username',
$this->CreateInputText( $id, 'feu_input_username',
$username,
$this->GetPreference('usernamefldlength'),
$this->GetPreference('max_usernamelength')));
*/
$smarty->assign('input_label', $id );
$smarty->assign('id_password',$id.'feu_input_password');
$smarty->assign('prompt_password', $this->Lang('prompt_password'));
$smarty->assign('input_password', '<input type="password" name = "' .$id. 'feu_input_password" class="passwordfield"
onfocus="this.style.backgroundImage=\'none\'" onblur="if(this.value==\'\'){this.style.backgroundImage=\'url(images/login-password.gif)\'}" />');
/*