Skip to content

Commit 564e189

Browse files
committed
Added method to return all users
1 parent a8abdd0 commit 564e189

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

core/User.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,26 @@ static function deleteUser(string $uuid)
9292
}
9393

9494
/**
95-
* @param int $uuid
95+
* @param string $uuid
9696
* @return array|null
9797
*/
9898
static function getUser(string $uuid): ?array
9999
{
100100
return DB::single('SELECT * FROM ' . $_ENV['DB_PREFIX'] . 'user WHERE uuid = ?', [$uuid]);
101101
}
102102

103+
/**
104+
* @return array|null
105+
*/
106+
static function getUsers(): ?array
107+
{
108+
return DB::single('SELECT * FROM ' . $_ENV['DB_PREFIX'] . 'user', []);
109+
}
110+
111+
/**
112+
* @param string $email
113+
* @return array|null
114+
*/
103115
static function getUserByEmail(string $email): ?array
104116
{
105117
return DB::single('SELECT * FROM ' . $_ENV['DB_PREFIX'] . 'user WHERE email = ?', [$email]);

0 commit comments

Comments
 (0)