Concrete5 and Magento

Good day, I have site based on concrete5 and shop(Catalog) based on Magento.
I want to show prices in Magento only for users which are logged in Concrete5.
I made static page with code:
            $uinfo = new User();
             echo "1";
         } else { 
          echo "0";

It brings 1 i user is logged in. Basically it works, but when I try to import it via file_get_contents
it brings 0.
Can anyone help how to solve this issue?

View Replies: View Best Answer
jaredquinn replied on at Permalink Best Answer Reply
The isLoggedIn() function relies on checking some values in the current session.

So, you'll need to ensure that your session is maintained and more importantly, isn't clobbered by Magento's session management.

Concrete5 by default uses a session named 'CONCRETE5' unless it's over-ridden in your site.php file.

If you would like to check that there's a Concrete5 user logged in from within your Magento code, without loading the entire C5 framework, you could probably get away with doing something like (this hasn't been tested and is mostly off the top of my head):

$loginStatus = false;
$o_sessionName = session_name();
$o_sessionID = session_id();
if(isset($_COOKIE['CONCRETE5'])) {
} elseif(isset($_REQUEST['CONCRETE5'])) {
if(isset($_SESSION['uID']) && $_SESSION['uID'] > 0 && isset($_SESSION['uName']) && $_SESSION['uName'] != '') {
   $loginStatus = true;

Now testing the value of $loginStatus will tell you if there is a C5 user logged in or not. It won't be able to tell you anything more about them, but that seems to be all you want to know.

lak17a replied on at Permalink Reply
Thanks, it worked ;)
DriveA320 replied on at Permalink Reply
I tried using your script, but it's always saying that a user is not logged in even if the user is logged in. What's the deal?
Arequal replied on at Permalink Reply
manup replied on at Permalink Reply
manup replied on at Permalink Reply
Mage5 is not yet popular yet, but you can try this Package

See its Demo Video:

I hope you are looking for this kind of solution ?