Bugfix with caching. Sorry guys, my fault.
parent
7c313535bc
commit
b222d739b6
|
@ -267,11 +267,11 @@
|
||||||
private function AddToCache()
|
private function AddToCache()
|
||||||
{$this->MySql->query("REPLACE INTO userdata(id, userdata, lastreq, image)VALUES({0}, {1}, {2}, {3})", array($this->Uuid, $this->ToJson(), $this->LastRequest, $this->ProfileImageBlob));}
|
{$this->MySql->query("REPLACE INTO userdata(id, userdata, lastreq, image)VALUES({0}, {1}, {2}, {3})", array($this->Uuid, $this->ToJson(), $this->LastRequest, $this->ProfileImageBlob));}
|
||||||
|
|
||||||
public function ToArray()
|
public function ToArray($ExportImage = true)
|
||||||
{
|
{
|
||||||
if (!empty($this->FirstName))
|
if (!empty($this->FirstName))
|
||||||
{
|
{
|
||||||
return array("uuid" => $this->Uuid,
|
$Export = array("uuid" => $this->Uuid,
|
||||||
"firstname" => $this->FirstName,
|
"firstname" => $this->FirstName,
|
||||||
"lastname" => $this->LastName,
|
"lastname" => $this->LastName,
|
||||||
"homegrid" => $this->HomeGrid,
|
"homegrid" => $this->HomeGrid,
|
||||||
|
@ -281,8 +281,10 @@
|
||||||
"title" => $this->UserTitle,
|
"title" => $this->UserTitle,
|
||||||
"home" => $this->HomeRegionName,
|
"home" => $this->HomeRegionName,
|
||||||
"homelocation" => $this->HomeRegionPos,
|
"homelocation" => $this->HomeRegionPos,
|
||||||
"img" => $this->ProfileImageBlob,
|
|
||||||
"homeuri" => $this->HomeRegionUri);
|
"homeuri" => $this->HomeRegionUri);
|
||||||
|
if ($ExportImage)
|
||||||
|
{$Export["img"] = $this->ProfileImageBlob;}
|
||||||
|
return $Export;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{return false;}
|
{return false;}
|
||||||
|
@ -291,7 +293,7 @@
|
||||||
public function ToJson()
|
public function ToJson()
|
||||||
{
|
{
|
||||||
if (!empty($this->FirstName))
|
if (!empty($this->FirstName))
|
||||||
{return json_encode($this->ToArray());}
|
{return json_encode($this->ToArray(false));}
|
||||||
else
|
else
|
||||||
{return false;}
|
{return false;}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,8 +67,7 @@
|
||||||
for ($i = 0; $i < count($AllUsers); ++$i)
|
for ($i = 0; $i < count($AllUsers); ++$i)
|
||||||
{
|
{
|
||||||
$SingleUser = explode(",", $AllUsers[$i]);
|
$SingleUser = explode(",", $AllUsers[$i]);
|
||||||
for ($z = 0; $z < count($SingleUser); ++$z)
|
for ($z = 0; $z < count($SingleUser); ++$z) {$SingleUser[$z] = trim($SingleUser[$z]);}
|
||||||
{$SingleUser[$z] = trim($SingleUser[$z]);}
|
|
||||||
if (!empty($SingleUser[0]) && !empty($SingleUser[1]))
|
if (!empty($SingleUser[0]) && !empty($SingleUser[1]))
|
||||||
{
|
{
|
||||||
//The magic is done here
|
//The magic is done here
|
||||||
|
|
Loading…
Reference in New Issue