<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Using CMSBuilding Login</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Using-CMSBuilding-Login-70307</link>
        <description></description>
        <pubDate>Sat, 14 Mar 2026 06:25:13 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Using-CMSBuilding-Login-70307" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [benedict] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199659#post2199659</link>
          <description><![CDATA[Here's one we use all the time.  It's simple and works great...<br /><br /><a target="_blank" href="http://www.phpeasystep.com/workshopview.php?id=6">http://www.phpeasystep.com/workshopview.php?id=6</a><br />]]></description>
          <pubDate>Thu, 08 Oct 2009 15:16:01 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199659#post2199659</guid>
        </item>
                <item>
          <title>Re: [Djulia] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199656#post2199656</link>
          <description><![CDATA[Hi Dave,<br /><br />I've implemented the above and it worked well (except if user gets password wrong it takes them to the CMS login screen). But the clients I have asking for this functionality won't want back end users having access to the User Accounts section. <br /><br />What I really need is a dumbed down version of the User Accounts section that just takes a persons user name/password, real name and email (no hierarchical levels required). And of course, I need it by next Wednesday [:/] . Is this something you guys could put together quickly?<br /><br />Cheers,<br /><br />Benedict<br /><br />P.S. Great post Sagentic - you opened my eyes!<br />]]></description>
          <pubDate>Thu, 08 Oct 2009 00:54:35 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199656#post2199656</guid>
        </item>
                <item>
          <title>Re: [Dave] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199356#post2199356</link>
          <description><![CDATA[Hi Dave, <br /><br />Thanks, your suggestion is correct ! :) <br /><br />Djulia<br />]]></description>
          <pubDate>Wed, 16 Sep 2009 14:27:43 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199356#post2199356</guid>
        </item>
                <item>
          <title>Re: [Djulia] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199353#post2199353</link>
          <description><![CDATA[Hi Djulia,<br /><br />We're probably going to have a plugin that makes this even easier at some point.  But right now the easiest way to get the current user might be to do a getRecords() query with a where like this:<br /><br />'where' =&gt; &quot;username = '&quot; .mysql_real_escape_string(@$_SESSION['username']). &quot;'&quot;,<br /><br />Hope that helps!<br />]]></description>
          <pubDate>Wed, 16 Sep 2009 12:25:54 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199353#post2199353</guid>
        </item>
                <item>
          <title>Re: [Dave] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199350#post2199350</link>
          <description><![CDATA[Hi Dave,<font size="2"> <br /><br />This post open new possibilities, thank you very much ! <br /><br />It would be possible to obtain the value of createdByUserNum and updatedByUserNum in information of session ? <br /><br />I would like to use it with addForm.php. <br /><br />Thank you for your assistance. <br /><br />Djulia</font><br />]]></description>
          <pubDate>Wed, 16 Sep 2009 09:36:00 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199350#post2199350</guid>
        </item>
                <item>
          <title>Re: [chris] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199218#post2199218</link>
          <description><![CDATA[Alternatively, you could do the following if you want to hide the CMS login page and give them a more customized login page.  <br />This helps if you want to use CMSB as a user management tool, but not really give them access to the CMSB back end.<br /><br />1. Create an account with no access to CMSB (None)<br /><br />2. Create a login page (login.php)<br /><br /><code>&lt;form method=&quot;post&quot; action=<span style="color:red">&quot;http://www.yourdomain.com/cmsAdmin/admin.php&quot;</span>&gt;<br />&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;loginSubmit&quot; /&gt;<br />&lt;input type=&quot;hidden&quot; name=&quot;redirectUrl&quot; value=<span style="color:red">&quot;http://www.yourdomain.com/test/page.php&quot;</span> /&gt;<br /><br />&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;<br /> &lt;tr&gt;<br />  &lt;td&gt;Login&lt;/td&gt;<br /> &lt;/tr&gt;<br /> &lt;tr&gt;<br />  &lt;td align=&quot;center&quot;&gt;<br />   &lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;<br />    &lt;tr&gt;<br />     &lt;td&gt;Username&lt;/td&gt;<br /><br />     &lt;td&gt;Password&lt;/td&gt;<br />     &lt;td&gt;&lt;/td&gt;<br />    &lt;/tr&gt;<br />    &lt;tr&gt;<br />     &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot; value=&quot;&quot; size=&quot;12&quot; tabindex=&quot;1&quot;/&gt;&amp;nbsp;&lt;/td&gt;<br />     &lt;td&gt;&lt;input type=&quot;password&quot; name=&quot;password&quot; value=&quot;&quot; size=&quot;12&quot; tabindex=&quot;2&quot;/&gt;&amp;nbsp;&lt;/td&gt;<br />     &lt;td&gt;&lt;input type=&quot;submit&quot; name=&quot;login&quot; value=&quot;Login&quot; tabindex=&quot;4&quot; /&gt;&amp;nbsp;&lt;/td&gt;<br />    &lt;/tr&gt;<br /><br />   &lt;/table&gt;<br /><br />  &lt;script type=&quot;text/javascript&quot;&gt;<br />      document.getElementById('username').focus();<br />  &lt;/script&gt;<br /><br />  &lt;/td&gt;<br /> &lt;/tr&gt;<br />&lt;/table&gt;<br /><br />&lt;/form&gt;</code><br /><br />3. Protect the pages you want to protect using the CMSB Sessions<br /><br /><code>&lt;?php if (!defined('START_SESSION')) { define('START_SESSION', true); }<br /><br />require_once <span style="color:red">&quot;/home/pathto/public_html/cmsAdmin/lib/viewer_functions.php&quot;;</span><br /><br />if (!@$_SESSION['username']) { header(&quot;Location: <span style="color:red">http://www.yourdomain.com/test/login.php</span>&quot;); exit; }</code><br /><br />4. Change the values in red to match your site variables<br /><br />This is pretty basic in mock up and there can be a lot more styling.<br /><br />In addition, if you want to create a logout function separate from CMSB (so they are not redirected to the CMSB login screen) create a file called logout.php and link to it:<br /><br /><code>&lt;?<br />session_start();<br />session_destroy();<br />?&gt;<br />&lt;html&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br />&lt;title&gt;Logout&lt;/title&gt;<br />&lt;/head&gt;<br /><br />&lt;body&gt;<br />&lt;script type=&quot;text/javascript&quot;&gt;<br />&lt;!--<br />window.location = &quot;<span style="color:red">http://www.yourdomain.com/test/login.php</span>&quot;<br />//--&gt;<br />&lt;/script&gt;<br />&lt;/body&gt;<br /><br />&lt;/html&gt;</code><br /><br /><br />Let me know if I missed something. I tested this only briefly.<br /><br />Kenny<br />]]></description>
          <pubDate>Mon, 07 Sep 2009 15:49:31 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199218#post2199218</guid>
        </item>
                <item>
          <title>Re: [chris] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199129#post2199129</link>
          <description><![CDATA[I found a secret feature!<br /><br />Yes, you can redirect someone back to a page after they've logged in.<br /><br /><code>if (!@$_SESSION['username']) { header(&quot;Location: <span style="color:red">http://example.com/cmsAdmin/admin.php</span>?redirectUrl=&quot; . $_SERVER['REQUEST_URI']); exit; }</code><br /><br />That code will pass along the URL of the current page, so that after someone logs in, they'll be sent back.<br /><br />Hope this helps! :D<br />]]></description>
          <pubDate>Thu, 03 Sep 2009 20:08:41 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199129#post2199129</guid>
        </item>
                <item>
          <title>Re: [chris] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199101#post2199101</link>
          <description><![CDATA[That is working, it brings up the place for accessing admin or says you must login firt, but never takes me to the actual page I want.<br /><br />I ahve the page films.php, but going there takes me to the login which then takes me to admin.  If I then click on view site it takes me to the main page of the site and clicking on the fims link then takes me to admin, as I am now logged in.  It never actually lets me the see the page I'm trying to view.<br />]]></description>
          <pubDate>Wed, 02 Sep 2009 13:35:21 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199101#post2199101</guid>
        </item>
                <item>
          <title>Re: [Moonworks] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199099#post2199099</link>
          <description><![CDATA[Hi Moonworks:<br /><br />Yes, certainly. Replace the following line:<br /><br /><code>if (!@$_SESSION['username']) { die(&quot;You must login first!&quot;); }</code><br /><br />with this one:<br /><br /><code>  if (!@$_SESSION['username']) { header(&quot;Location: <span style="color:red">http://mydomain.com/cmsAdmin/</span>&quot;); exit; }</code><br /><br />and replace the red text above with the (full) URL to your login screen.<br /><br />Hope this works for you! :)<br />]]></description>
          <pubDate>Wed, 02 Sep 2009 12:11:25 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199099#post2199099</guid>
        </item>
                <item>
          <title>Re: [chris] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199095#post2199095</link>
          <description><![CDATA[Thanks,  looks like I've been doing it wrong all along.<br /><br />That worked fine, but just one more question.  where it says you must login first, is there a way to being up the login screen?<br />]]></description>
          <pubDate>Wed, 02 Sep 2009 11:38:03 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199095#post2199095</guid>
        </item>
                <item>
          <title>Re: [Moonworks] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199093#post2199093</link>
          <description><![CDATA[You can't have anything before the &lt;?php ?&gt; block which tries to start the session.<br /><br />Try this:<br /><br /><code>&lt;?php <br />   <br />  if (!defined('START_SESSION')) { define('START_SESSION', true); } <br />    require_once &quot;/var/www/vhosts/horroruk.com/httpdocs/admin/lib/viewer_functions.php&quot;; <br />     <br />if (!@$_SESSION['username']) { die(&quot;You must login first!&quot;); } <br /> <br />  list($filmRecords, $filmMetaData) = getRecords(array( <br />    'tableName'   =&gt; 'film', <br />    'perPage'     =&gt; '10', <br />  )); <br /> <br />?&gt; <br />&lt;html&gt; <br /> <br />&lt;head&gt; <br />&lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;en-gb&quot;&gt; <br /> <br />&lt;title&gt;Horror UK&lt;/title&gt;</code><br />]]></description>
          <pubDate>Wed, 02 Sep 2009 11:34:20 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199093#post2199093</guid>
        </item>
                <item>
          <title>Re: [chris] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199089#post2199089</link>
          <description><![CDATA[I get the error whatever I try.<br /><br />Here is the code I have:<br /><br /><code>&lt;html&gt;<br /><br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;en-gb&quot;&gt;<br />&lt;?php<br />  <br />  if (!defined('START_SESSION')) { define('START_SESSION', true); }<br />    require_once &quot;/var/www/vhosts/horroruk.com/httpdocs/admin/lib/viewer_functions.php&quot;;<br />    <br />if (!@$_SESSION['username']) { die(&quot;You must login first!&quot;); }<br /><br />  list($filmRecords, $filmMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'film',<br />    'perPage'     =&gt; '10',<br />  ));<br /><br />?&gt;<br /><br />&lt;title&gt;Horror UK&lt;/title&gt;</code><br />]]></description>
          <pubDate>Wed, 02 Sep 2009 10:57:13 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199089#post2199089</guid>
        </item>
                <item>
          <title>Re: [Moonworks] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199080#post2199080</link>
          <description><![CDATA[Hi Moonworks,<br /><br />Your script can't output anything before it tries to start a session. Even a single space before your &lt;?php will cause that error.<br /><br />If you're not able to get this sorted out yourself, please post your PHP source code (films.php?) as an attachment.<br />]]></description>
          <pubDate>Wed, 02 Sep 2009 00:26:35 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199080#post2199080</guid>
        </item>
                <item>
          <title>Re: [andycal] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2199077#post2199077</link>
          <description><![CDATA[I've tried the above, but get the following error:<br /><br /><code>Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/vhosts/horroruk.com/httpdocs/films.php:5) in /var/www/vhosts/horroruk.com/httpdocs/admin/lib/init.php on line 63</code><br />]]></description>
          <pubDate>Tue, 01 Sep 2009 20:46:57 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2199077#post2199077</guid>
        </item>
                <item>
          <title>Re: [Dave] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198870#post2198870</link>
          <description><![CDATA[Bingo! Thanks Dave!<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 16:17:30 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198870#post2198870</guid>
        </item>
                <item>
          <title>Re: [andycal] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198869#post2198869</link>
          <description><![CDATA[Hi andycal,<br /><br />This isn't something that's supported by the software, but I'll try and point you in the right direction.  We switched from cookies to sessions in a recent version, so upgrade if you haven't already.<br /><br />Next, add this line in red before you load the viewer functions:<br /><br /><code><span style="color:red">  if (!defined('START_SESSION')) { define('START_SESSION', true); }</span><br />  require_once &quot;../lib/viewer_functions.php&quot;;</code><br /><br />That tells it to start a session.  Next, you can display an error message for users who are not logged in like this:<br /><br /><code>&lt;?php if (!@$_SESSION['username']) { die(&quot;You must login first!&quot;); } ?&gt;</code><br /><br />And you can see all the session variables available like this:<br /><br /><code>&lt;xmp&gt;&lt;?php print_r( $_SESSION ) ?&gt;&lt;/xmp&gt;</code><br /><br />Note that the program internals might change over time.  Probably not for a long while, but be sure to test your custom code after future upgrades.<br /><br />Hope that helps!<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 15:35:06 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198869#post2198869</guid>
        </item>
                <item>
          <title>Re: [andycal] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198868#post2198868</link>
          <description><![CDATA[No idea andycal, but that's a great question. <br /><br />Back when I did this, and perhaps even now, I wasn't able to add extra fields to the user table on CMSB. Neccessity begat invention. <br /><br />J.<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 15:09:49 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198868#post2198868</guid>
        </item>
                <item>
          <title>Re: [InHouse] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198866#post2198866</link>
          <description><![CDATA[Hang on guys, before we get carried away, I'm sure there's an easier way. When I log in to the CMS admin, a session variable is surely set. If I know what this is, I can protect other pages. Or does it use some other method to know who's logged in?<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 14:54:54 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198866#post2198866</guid>
        </item>
                <item>
          <title>Re: [gkornbluth] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198864#post2198864</link>
          <description><![CDATA[I can do so in brief from memory. Details can be provided later if needed:<br /><br />1 - Created a mulit-record table in CMSB called 'Subscribers'. Contains user info, password, contacts, and permission data. In my case the latter was a drop-down menu containing user level types. My client wanted to have viewers only see certain data so this table also had extra permission fields. i.e.: red stuff, blue stuff, green stuff.<br /><br />2 - The client was signing up users manually, but you could have a sign-up form which populates that table. Moderator oversight may be required.<br /><br />3 - On the login page. The user would enter their username and password. These are checked against the user table. If their account is in good standing, create session vars based on some kind of temp hash of their username and/or system time (or similar).<br /><br />4 - On each subsequent page, at load, check the session vars and see if their reversed-hash info matches the valid account info from the CMSB table. If not, bounce the user back to page 1. If valid, read their data viewing permissions and display the content accordingly (i.e.: red stuff, blue stuff, green stuff,etc.). Users with certain levels of permission such as Admins or Mods might see multiple sets of data.<br /><br />5 - For some critical bits of content, or with certain user actions, we send emails or append to a flat file log of what user took a given action. That way we know if they downloaded a given file or went to a particular page.<br /><br />It must be noted that this site was just intended for non-commercial actions as this method is far from foolproof. But it does allow one to know which of your users came to your site, what pages they viewed, and permit you to show the right data to the right groups of users provided that none of them know enough about how to spoof the session vars or some of the page headers. Security is relative.<br /><br />This site was originally built on CMSB 1.20 and I'm sure we might approach some things a little differently now.<br /><br />Hope this helps!<br /><br />J.<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 14:15:48 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198864#post2198864</guid>
        </item>
                <item>
          <title>Re: [InHouse] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198863#post2198863</link>
          <description><![CDATA[sounds like an interesting approach, could you expand a bit on the process and code?<br /><br />Jerry Kornbluth]]></description>
          <pubDate>Thu, 20 Aug 2009 13:51:29 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198863#post2198863</guid>
        </item>
                <item>
          <title>Re: [gkornbluth] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198862#post2198862</link>
          <description><![CDATA[In the past I've set session vars once a registered user has logged into a site. Then on each page I sniff for those vars and if that user has values in their account info (CMSB Table) that matches the permitted users for that page, then they can go on and read the page. Otherwise, they are bounced, or some content is displayed conditionally.<br /><br />Basically this is the same method that Dreamweaver users by default in these cases.<br />J.<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 13:47:46 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198862#post2198862</guid>
        </item>
                <item>
          <title>Re: [andycal] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198859#post2198859</link>
          <description><![CDATA[There are 2 approaches that come to mind. <br /><br />1) Don't provide any public links to the versions of those pages with the private data.<br /><br />2) Password protect the folder with those pages if you need the added security. <br /><br />You can use a free password management program like Account Manager Lite by Site Interactive or just use .htaccess files.<br /><br />Does that help at all?<br /><br />Best,<br /><br />Jerry Kornbluth<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 13:07:49 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198859#post2198859</guid>
        </item>
                <item>
          <title>Re: [gkornbluth] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198858#post2198858</link>
          <description><![CDATA[Not quite. <br /><br />What I'm after is a way of knowing who my CMSB users are on none CMSB pages. For example, I have some pages on my site that are visible to all, but I want my CSMB admins to be able to view certain sections that are hidden from the general public.<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 11:39:52 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198858#post2198858</guid>
        </item>
                <item>
          <title>Re: [andycal] Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198851#post2198851</link>
          <description><![CDATA[If you mean allowing certain CMSB users to edit only certain pages and not  others, you can restrict access down to the author of a page in specific sections when you set up their user account.<br /><br />In the section access pulldown menu you can specify specific sections and restrict access that way. <br /><br />If that's not what you're asking, let us know,<br /><br />Best,<br /><br />Jerry Kornbluth<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 06:46:31 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198851#post2198851</guid>
        </item>
                <item>
          <title>Using CMSBuilding Login</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198849#post2198849</link>
          <description><![CDATA[Anyone know what session variables should I be checking for if I want to protect other pages of my site? Or maybe I should be including a file and using a function?<br /><br />Any help appreciated!<br />]]></description>
          <pubDate>Thu, 20 Aug 2009 01:58:48 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198849#post2198849</guid>
        </item>
              </channel>
    </rss>
  