fixed lastactive
This commit is contained in:
parent
749e2e1aa9
commit
44042734ac
@ -27,7 +27,7 @@ class QP {
|
|||||||
|
|
||||||
public static function QI($params,$params_mys = null){
|
public static function QI($params,$params_mys = null){
|
||||||
$qq = self::QQ($params,$params_mys);
|
$qq = self::QQ($params,$params_mys);
|
||||||
return $qq->affectedRows() != (0||null);}
|
return $qq->affectedRows() != (0||null);}
|
||||||
//override this
|
//override this
|
||||||
protected static function query(){
|
protected static function query(){
|
||||||
throw new \SYSTEM\LOG\ERROR('query function of your QP Class not overwritten!');}
|
throw new \SYSTEM\LOG\ERROR('query function of your QP Class not overwritten!');}
|
||||||
|
|||||||
@ -10,10 +10,10 @@ class SYS_SECURITY_UPDATE_LASTACTIVE extends \SYSTEM\DB\QP {
|
|||||||
return new \SYSTEM\DB\QQuery(get_class(),
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
//pg
|
//pg
|
||||||
'UPDATE '.\SYSTEM\DBD\system_user::NAME_PG.
|
'UPDATE '.\SYSTEM\DBD\system_user::NAME_PG.
|
||||||
' SET '.\SYSTEM\DBD\system_user::FIELD_LAST_ACTIVE.'= to_timestamp($1)'.
|
' SET '.\SYSTEM\DBD\system_user::FIELD_LAST_ACTIVE.' = NOW()'.
|
||||||
' WHERE '.\SYSTEM\DBD\system_user::FIELD_ID.' = $2;',
|
' WHERE '.\SYSTEM\DBD\system_user::FIELD_ID.' = $1;',
|
||||||
//mys
|
//mys
|
||||||
'UPDATE '.\SYSTEM\DBD\system_user::NAME_MYS.
|
'UPDATE '.\SYSTEM\DBD\system_user::NAME_MYS.
|
||||||
' SET '.\SYSTEM\DBD\system_user::FIELD_LAST_ACTIVE.'= ?'.
|
' SET '.\SYSTEM\DBD\system_user::FIELD_LAST_ACTIVE.' = NOW()'.
|
||||||
' WHERE '.\SYSTEM\DBD\system_user::FIELD_ID.' = ?;'
|
' WHERE '.\SYSTEM\DBD\system_user::FIELD_ID.' = ?;'
|
||||||
);}}
|
);}}
|
||||||
@ -65,7 +65,7 @@ class Security {
|
|||||||
\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL));
|
\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL));
|
||||||
if(isset($locale)){
|
if(isset($locale)){
|
||||||
\SYSTEM\locale::set($locale);}
|
\SYSTEM\locale::set($locale);}
|
||||||
\SYSTEM\DBD\SYS_SECURITY_UPDATE_LASTACTIVE::QI(array(microtime(true), $row[\SYSTEM\DBD\system_user::FIELD_ID]));
|
\SYSTEM\DBD\SYS_SECURITY_UPDATE_LASTACTIVE::QI(array($row[\SYSTEM\DBD\system_user::FIELD_ID]));
|
||||||
return ($advancedResult ? $row : self::OK);
|
return ($advancedResult ? $row : self::OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user