implementation of PRG + minor fixes
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
class Databap extends PhpObject
|
||||
{
|
||||
//Common Constants
|
||||
const VERSION = '1.0.0-RC3'; //Versioning: <Main_Version>.<Enhancement_Package>.<Patch>-<Release_Candidate>
|
||||
const VERSION_DATE = '02/07/2014';
|
||||
const VERSION = '1.0.0-RC4'; //Versioning: <Main_Version>.<Enhancement_Package>.<Patch>-<Release_Candidate>
|
||||
const VERSION_DATE = '31/07/2014';
|
||||
const EXPECTED_PAGE_COOKIE = 'exp_page';
|
||||
const MAIN_SEPARATOR = ' ';
|
||||
const DATE_FORMAT = 'd/m/Y';
|
||||
@@ -1079,11 +1079,12 @@ class Databap extends PhpObject
|
||||
|
||||
public function getUserInfo($iUserId, $bJson=false)
|
||||
{
|
||||
$asUserInfo = array();
|
||||
if($iUserId==$this->getUserId() && !empty($this->asUserInfo))
|
||||
{
|
||||
$asUserInfo = $this->asUserInfo;
|
||||
}
|
||||
else
|
||||
elseif($iUserId > 0)
|
||||
{
|
||||
$asRow = $this->oMySql->selectRow(self::USER_TABLE, $iUserId);
|
||||
$sEmail = $this->getUserOptionValue(self::OPT_EMAIL, $iUserId);
|
||||
@@ -2221,6 +2222,7 @@ class Databap extends PhpObject
|
||||
public function logMeIn($sToken, $sAction)
|
||||
{
|
||||
$iUserId = 0;
|
||||
$sNameToken = '';
|
||||
$bResetPass = true;
|
||||
$sUserTableId = MySqlManager::getId(self::USER_TABLE);
|
||||
|
||||
@@ -2270,6 +2272,14 @@ class Databap extends PhpObject
|
||||
{
|
||||
$this->resetAuthCookie();
|
||||
}
|
||||
|
||||
//Post-Redirect-Get if user manually logging from logon page
|
||||
if($sNameToken!='')
|
||||
{
|
||||
header('HTTP/1.1 303 See Other');
|
||||
header('Location: '.$_SERVER['REQUEST_URI']);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
return ($this->getUserId()>0);
|
||||
|
||||
Reference in New Issue
Block a user