loaing of model via arbitrary field and nice home page
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
2023-10-29 17:37:28 +01:00
parent fea847afd2
commit 4516486b8e
5 changed files with 120 additions and 7 deletions

View File

@ -5,7 +5,7 @@ class User extends Model {
protected $dbFields = Array (
'uuid' => ['type'=>'text','required','unique','autoValMethod'=>'gen_ulid'],
'password' => ['type'=>'text'],
'registered' => ['type'=>'datetime','required','unique','autoValMethod'=>'getDateTime'],
'registered' => ['type'=>'datetime','required','autoValMethod'=>'getDateTime'],
'email' => ['type'=>'email','unique'],
'firstname' => ['type'=>'text'],
'lastname' => ['type'=>'text'],
@ -14,6 +14,7 @@ class User extends Model {
'timezone' => ['type'=>'int'],
'dogs' => ['type'=> 'array','default'=>[]],
'tournaments' => ['type'=> 'array','default'=>[]],
'photo' => ['type'=>'text','default'=>'https://pictshare.net/pj7vzx.jpg'],
'active' => ['type'=>'int','default'=>0]
);
protected $hidden = ['password','token'];
@ -46,7 +47,7 @@ class User extends Model {
function getAll($filtered = true)
{
$keys = $this->redis->keys($this->dbTable.':*');
$keys = $GLOBALS['redis']->keys($this->dbTable.':*');
$users = [];
foreach($keys as $key)
{