<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aaron Jefferson Villanueva&#039;s Blog Site&#187; CMSMS FrontEnd User</title>
	<atom:link href="http://malebolgia.shadowsonawall.net/tag/cmsms-frontend-user/feed" rel="self" type="application/rss+xml" />
	<link>http://malebolgia.shadowsonawall.net</link>
	<description>Programming / Designing Blogging from windows to mac.</description>
	<lastBuildDate>Fri, 20 May 2011 12:05:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CMSMS FrontEnd User Hack&#8230;</title>
		<link>http://malebolgia.shadowsonawall.net/code-programming/cmsms-frontend-user-hack-for-automatic-login.html</link>
		<comments>http://malebolgia.shadowsonawall.net/code-programming/cmsms-frontend-user-hack-for-automatic-login.html#comments</comments>
		<pubDate>Tue, 30 Sep 2008 05:29:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coding/Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Automatic Login]]></category>
		<category><![CDATA[CMSMS FrontEnd User]]></category>

		<guid isPermaLink="false">http://malebolgia.shadowsonawall.net/?p=51</guid>
		<description><![CDATA[CMSMS FrontEnd User Hack for Automatic Login 

The following step by step method I did Integrating CMSMS and amember for automatic login
&#13; 
&#13; Current Version of FrontEndUsers plugin is 1.5.2
&#13; CMSMS Version 1.4.1
&#13; 
&#13; For Session - I used&#13;

&#13; &#160;&#160;&#160; $_SESSION['fe_user_logged_in'] //- just passing a non sense string   not important.
&#13; &#160;&#160;&#160; $_SESSION['fe_int_username'] //- [...]]]></description>
			<content:encoded><![CDATA[<strong>CMSMS FrontEnd User Hack for Automatic Login</strong> <br />

The following step by step method I did Integrating CMSMS and amember for automatic login<br />
&#13; <br />
&#13; Current Version of <span style="color: rgb(153, 51, 0);"><b>FrontEndUsers</b></span> plugin is 1.5.2<br />
&#13; <span style="color: rgb(0, 128, 128);"><b>CMSMS</b></span> Version 1.4.1<br />
&#13; <br />
&#13; <b><span style="color: rgb(128, 0, 0);">For Session - I used</span></b><span style="font-size: smaller;">&#13;
<p style="background-color: rgb(192, 192, 192);"><br />
&#13; &nbsp;&nbsp;&nbsp; $_SESSION['fe_user_logged_in'] //- just passing a non sense string <img src='http://malebolgia.shadowsonawall.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  not important.<br />
&#13; &nbsp;&nbsp;&nbsp; $_SESSION['fe_int_username'] //- passing username value<br />
&#13; &nbsp;&nbsp;&nbsp; $_SESSION['fe_int_password'] //- passing password value<br />
&#13; &nbsp;</p>
&#13; <span style="color: rgb(255, 0, 0);"><i><span style="font-size: larger;">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</span><span style="font-size: larger;"> username and password.</span></i></span><span style="color: rgb(0, 128, 128);"><b><span style="font-size: larger;"><br />
&#13; <br />
&#13; CMSMS</span></b></span><span style="font-size: larger;"><br />
&#13; Front End User Login</span><br />
&#13; </span> -----------------------------------------------------------------------------------------------------<br />
&#13; <b>1</b>.)at [<span style="color: rgb(51, 51, 0);">index.php</span>] root of cmsms<br />
&#13; add <b><span style="color: rgb(255, 102, 0);">session_start();</span></b> at the beginning<br />
&#13; <br />
&#13; over modules folder find<br />
&#13; <span style="color: rgb(153, 51, 0);"><i>FrontEndUsers</i></span> folder<br />
&#13; <br />
&#13; <b>2</b>.)Injecting the Sessions<br />
&#13; <br />
&#13; on - [<span style="color: rgb(51, 51, 0);">action.do_login.php</span>]<br />
&#13; <br />
&#13; find (could be) on line 80:<br />
&#13;
<p style="background-color: rgb(192, 192, 192);"><span style="font-size: smaller;">&nbsp;&nbsp;&nbsp;&nbsp; <br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $this->Audit( 0, $this->Lang('friendlyname'),<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $this->Lang('frontenduser_loggedin').&quot;: &quot;.$params['feu_input_username'] );<br />
&#13; <br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; //<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; // we're logged in<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; //<br />
&#13; <br />
&#13; </span></p>
&#13; put these following code at bottom of it:&#13;
<p style="background-color: rgb(192, 192, 192);"><span style="font-size: smaller;">&nbsp;&nbsp;&nbsp;&nbsp; <br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; /* Custom Login Session */<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $_SESSION['fe_user_logged_in'] = &quot;logged_in&quot;; // store session data<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $_SESSION['fe_int_username'] = $params['feu_input_username']; //username<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $_SESSION['fe_int_password'] = $params['feu_input_password']; //password<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; session_write_close();<br />
&#13; <br />
&#13; </span></p>
&#13; <b>3</b>.)Erasing the Session<br />
&#13; <br />
&#13; on - [<span style="color: rgb(51, 51, 0);">action.logout.php</span>]<br />
&#13; <br />
&#13; find (could be) on line 53:<br />
&#13;
<p style="background-color: rgb(192, 192, 192);">&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size: smaller;"><span style="background-color: rgb(192, 192, 192);"> <br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $this->SendEvent( 'OnLogout', $parms );<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $this->_SendNotificationEmail('OnLogout',$parms);<br />
&#13; <br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; // we're logged out<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; // redirect somewhere <br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; // todo, add more options here.<br />
&#13; </span></span></p>
&#13; put these following code at bottom of it:<span style="font-size: smaller;">&#13;
<p style="background-color: rgb(192, 192, 192);"><br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; /* Custom Logout Session */<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $_SESSION['fe_user_logged_in'] = NULL; // store session data as NULL<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $_SESSION['fe_int_username'] = NULL;<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; $_SESSION['fe_int_password'] = NULL;<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp; session_write_close();<br />
&#13; &nbsp;</p>
&#13; </span><b>4</b>.)This is not necessary but if you want to custom design or name on your login boxes you can edit the hard code at:<br />
&#13; <br />
&#13; [<span style="color: rgb(51, 51, 0);">function.user_loginform.php</span>]<br />
&#13; <br />
&#13; Like in this case I added some javascript on input boxes and also changed the class style.<br />
&#13;
<p style="background-color: rgb(192, 192, 192);"><span style="font-size: smaller;"><br />
&#13; /*<br />
&#13; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $smarty->assign('input_username', <br />
&#13; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $this->CreateInputText( $id, 'feu_input_username',<br />
&#13; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; $username,<br />
&#13; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $this->GetPreference('usernamefldlength'),<br />
&#13; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $this->GetPreference('max_usernamelength')));<br />
&#13; */&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&#13; <br />
&#13; &nbsp;&nbsp;&nbsp; $smarty->assign('input_label', $id );<br />
&#13; &nbsp;&nbsp;&nbsp; $smarty->assign('id_password',$id.'feu_input_password');<br />
&#13; &nbsp;&nbsp;&nbsp; $smarty->assign('prompt_password', $this->Lang('prompt_password'));<br />
&#13; <br />
&#13; &nbsp;&nbsp;&nbsp; $smarty->assign('input_password', '&lt;input type=&quot;password&quot; name = &quot;' .$id.&nbsp; 'feu_input_password&quot; class=&quot;passwordfield&quot; <br />
&#13; <br />
&#13; &nbsp;&nbsp;&nbsp; onfocus=&quot;this.style.backgroundImage=\'none\'&quot; onblur=&quot;if(this.value==\'\'){this.style.backgroundImage=\'url(images/login-password.gif)\'}&quot;  />');<br />
&#13; <br />
&#13; /*<br />
&#13; <br />
&#13; </span></p>
&#13; <br />
&#13; <br />
&#13; <br />
&#13; <br />]]></content:encoded>
			<wfw:commentRss>http://malebolgia.shadowsonawall.net/code-programming/cmsms-frontend-user-hack-for-automatic-login.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

