User Manager Class Tweaks

This commit is contained in:
JonatanRek 2020-01-17 08:12:50 +01:00
parent db3ab9dd95
commit 2dd2b3c6f7

View File

@ -102,10 +102,9 @@ class UserManager
}
public static function getUserData ($type, $userId = '') {
if (isset($_SESSION['user']['id'])) {
if ($userId == '') {
$userId = $_SESSION['user']['id'];
} else {
return "";
echo 'no user id';
}
$user = Db::loadOne ('SELECT ' . $type . ' FROM users WHERE user_id=?', array ($userId));
return $user[$type];