|
@@ -39,7 +39,11 @@ class User extends BaseService
|
|
*/
|
|
*/
|
|
public static function getCurrentLoginUserId()
|
|
public static function getCurrentLoginUserId()
|
|
{
|
|
{
|
|
- return Session::get(self::USER_ID);
|
|
|
|
|
|
+ $userId = Session::get(self::USER_ID);
|
|
|
|
+ if (empty($userId)){
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ return intval($userId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|