Example #1
0
 function get($loginId)
 {
     $key = Nest::preference("user", $loginId);
     $row = mysql\Collection::glget($key);
     $pData = NULL;
     if (!empty($row)) {
         //json stored in DB for this login
         $strPData = $row["t_value"];
         $pData = json_decode($strPData);
     }
     if (is_null($pData)) {
         // if no row found for user
         // then return default (all true)
         $pData = new \stdClass();
         $pData->follow = true;
         $pData->comment = true;
         $pData->bookmark = true;
     }
     return $pData;
 }
Example #2
0
 function glget($key)
 {
     $row = mysql\Collection::glget($key);
     return $row;
 }