mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Fixed
This commit is contained in:
1 parent
41916a90bd
commit
cb6ab3bdda
3 files changed
+19
-7
No files matched your search
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Notification Manager
|
||||
*/
|
||||
//TODO: Working timestamp to body or $title
|
||||
//TODO: Working timestamp to $title
|
||||
class NotificationManager
|
||||
{
|
||||
function addSubscriber($userID = '', $token = ''){
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
class UserManager
|
||||
{
|
||||
public static function getUsers () {
|
||||
public static function getUsers ($filtr = ['*']) {
|
||||
try {
|
||||
$allUsers = Db::loadAll ("SELECT user_id, username, at_home, ota FROM users");
|
||||
$allUsers = Db::loadAll ("SELECT " . implode($filtr, ",") . " FROM users");
|
||||
return $allUsers;
|
||||
} catch(PDOException $error) {
|
||||
echo $error->getMessage();
|
||||
@@ -32,8 +32,10 @@ class UserManager
|
||||
}
|
||||
|
||||
public static function getAvatarUrl($userId = null){
|
||||
$email = self::getUserData('email');
|
||||
if ($userId != null){
|
||||
if ($userId == null) {
|
||||
$email = self::getUserData('email');
|
||||
}
|
||||
else if ($userId != null){
|
||||
$email = self::getUserData('email',$userId);
|
||||
}
|
||||
return 'https://secure.gravatar.com/avatar/' . md5( strtolower( trim( $email ) ) );
|
||||
|
||||
Reference in new issue
Block a user