User Manager Class Tweaks
This commit is contained in:
parent
db3ab9dd95
commit
2dd2b3c6f7
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user