Fixed 500 when editing an Angeltype while session expires

This commit is contained in:
Igor Scheller 2020-11-23 23:36:54 +01:00 committed by msquare
parent 3129d53a64
commit 6738fbeec3
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ function User_unconfirmed_AngelTypes($userId)
*/ */
function User_is_AngelType_supporter($user, $angeltype) function User_is_AngelType_supporter($user, $angeltype)
{ {
if (!$user) {
return false;
}
$privileges = privileges_for_user($user->id); $privileges = privileges_for_user($user->id);
return (count(DB::select(' return (count(DB::select('