mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'fix/username' into 'main'
Fixed campo secret para obtener el email See merge request jjimenez/safekat!814
This commit is contained in:
@ -20,7 +20,7 @@ class ActivityModel extends BaseModel
|
|||||||
|
|
||||||
const SORTABLE = [
|
const SORTABLE = [
|
||||||
1 => "t1.id",
|
1 => "t1.id",
|
||||||
2 => "t2.username",
|
2 => "t3.secret",
|
||||||
3 => "t1.level",
|
3 => "t1.level",
|
||||||
4 => "t1.event",
|
4 => "t1.event",
|
||||||
5 => "t1.ip",
|
5 => "t1.ip",
|
||||||
@ -55,10 +55,17 @@ class ActivityModel extends BaseModel
|
|||||||
$builder = $this->db
|
$builder = $this->db
|
||||||
->table($this->table . " t1")
|
->table($this->table . " t1")
|
||||||
->select(
|
->select(
|
||||||
"t1.id AS id, t2.username AS user, t1.level AS level, t1.event AS event, t1.ip AS ip, t1.os AS os,
|
"t1.id AS id,
|
||||||
t1.browser AS browser, t1.created_at AS created_at"
|
t3.secret AS user,
|
||||||
|
t1.level AS level,
|
||||||
|
t1.event AS event,
|
||||||
|
t1.ip AS ip,
|
||||||
|
t1.os AS os,
|
||||||
|
t1.browser AS browser,
|
||||||
|
t1.created_at AS created_at"
|
||||||
)
|
)
|
||||||
->join("users t2", "t1.user_id = t2.id", "left")
|
->join("users t2", "t1.user_id = t2.id", "left")
|
||||||
|
->join("auth_identities t3", "t3.user_id = t2.id AND t3.type = 'email_password'", "left")
|
||||||
->orderBy('t1.created_at', 'DESC');
|
->orderBy('t1.created_at', 'DESC');
|
||||||
|
|
||||||
return empty($search)
|
return empty($search)
|
||||||
@ -66,7 +73,7 @@ class ActivityModel extends BaseModel
|
|||||||
: $builder
|
: $builder
|
||||||
->groupStart()
|
->groupStart()
|
||||||
->like("t1.id", $search)
|
->like("t1.id", $search)
|
||||||
->orLike("t2.username", $search)
|
->orLike("t3.secret", $search)
|
||||||
->orLike("t1.level", $search)
|
->orLike("t1.level", $search)
|
||||||
->orLike("t1.event", $search)
|
->orLike("t1.event", $search)
|
||||||
->orLike("t1.ip", $search)
|
->orLike("t1.ip", $search)
|
||||||
|
|||||||
Reference in New Issue
Block a user