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 = '') {
|
public static function getUserData ($type, $userId = '') {
|
||||||
if (isset($_SESSION['user']['id'])) {
|
if ($userId == '') {
|
||||||
$userId = $_SESSION['user']['id'];
|
$userId = $_SESSION['user']['id'];
|
||||||
} else {
|
echo 'no user id';
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
$user = Db::loadOne ('SELECT ' . $type . ' FROM users WHERE user_id=?', array ($userId));
|
$user = Db::loadOne ('SELECT ' . $type . ' FROM users WHERE user_id=?', array ($userId));
|
||||||
return $user[$type];
|
return $user[$type];
|
||||||
|
Loading…
Reference in New Issue
Block a user