set a cookie or session ID

How would I set a cookie or a session when a member logs in with the mobile app?

I am working with some code that uses jquery and I am not passing the userid and pw along with the query.

I guess I could, I was just thinking it would be more elegant to have a session ID or Cookie set for the mobile app to check it when I run the code on the back end.

Thanks!

http://www.mytikibar.com
Quote · 26 Feb 2013

i think the mobile app already processes the login info and sets variables - i could be wrong though - but i noticed that when a user with a membership that does not allow viewing profiles will get a access denied if trying to view a profile in the mobile app.a i created a test page a while back, in which someone here helped me with the variables.

Checkout the http://www.boonex.com/trac/dolphin/wiki/DolModMobile and inc/classes/BxDolMobileTemplate.php and http://www.boonex.com/doc/da/d22/class_bx_dol_mobile_template.html and

caredesign.net
Quote · 26 Feb 2013

The problem is, it doesn't set a session ID or make any notations in the database that you are logged in via the mobile app.

So, if you make a call via jQuery and you need to know if you are logged in or not, you can't check it.

So, I cant get the profileID to process certain things.

 

http://www.mytikibar.com
Quote · 27 Feb 2013

http://www.boonex.com/forums/topic/Membership-Levels-2013-02-13.htm#196992

Rules → http://www.boonex.com/terms
Quote · 27 Feb 2013

OK,I know I am a lil retarded and cant comprehend thiings sometimes, but I will do my best to explain what I have going on, and hope it helps you.

I created a simple php page with the following code and called it test.php:

<?php
session_start();
$membID = $_GET['memberID'];

if (isset($membID)) {

//you can start your own sessions

$_SESSION['start'] = time();
echo $_SESSION['start'];

// you can add sql queries to pull in info based on user
// add your connection script here
$membship = mysql_query("SELECT * FROM sys_acl_levels_members WHERE IDMember = '$membID'");

while ($membshiplvl = mysql_fetch_row($membship)) {   
    $Level = $membshiplvl[1];    //-- this will check membership levels

}

if ($Level == '4') {

//whatever you only want this membership level to see - in my case i only want the videos to be viewable by those with the streaming membership level, which is 4

} else {

}


}

else

{

// error message

}

?>

 

Then, I created my icon/link for the homepage via the sys_mobile_menu table in the database and used this for the url field:

{site_url}test.php?memberID={member_id}

caredesign.net
Quote · 27 Feb 2013

 

http://www.boonex.com/forums/topic/Membership-Levels-2013-02-13.htm#196992

 I see what you are doing there!

Thanks!

http://www.mytikibar.com
Quote · 3 Mar 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.