fix write page

This commit is contained in:
francois
2018-04-09 22:01:42 +02:00
parent ab12b33532
commit 76faf824fc
13 changed files with 445 additions and 398 deletions

View File

@@ -17,6 +17,7 @@ class Auth extends PhpObject
public function __construct($oDb, $sApiKey='', $bAutoLogin=true)
{
parent::__construct(__CLASS__, Settings::DEBUG);
$this->oDb = $oDb;
$this->setUserId(0);
$this->sApiKey = $sApiKey;
@@ -73,7 +74,7 @@ class Auth extends PhpObject
$sCookie = $_COOKIE[self::USER_COOKIE_PASS];
$iUserId = addslashes(strstr($sCookie, self::TOKEN_SEP, true));
$sCookie = substr(strstr($sCookie, self::TOKEN_SEP), strlen(self::TOKEN_SEP));
$asEmpl = $this->oDb->selectRow(MyThoughts::USER_TABLE, array(Db::getId(MyThoughts::USER_TABLE)=>$iUserId));
if(!empty($asEmpl))
{