Commit 986d4874 authored by Ben Hayward's avatar Ben Hayward

Unneeded files

parent 7ff0ea00
Pipeline #174731149 failed with stages
in 5 minutes and 51 seconds
......@@ -55,24 +55,19 @@ class channel implements Interfaces\Api
]);
}
if ($user->banned == 'yes' && !Core\Session::isAdmin()) {
if ($user->enabled != "yes") {
return Factory::response([
'status'=>'error',
'message'=>'This user has been banned',
'type'=>'ChannelBannedException',
'message'=>'Sorry, this user is disabled',
'type'=>'ChannelDisabledException',
]);
}
$block = Core\Security\ACL\Block::_();
$isBlocked = $block->isBlocked((string) $user->guid);
if ($user->enabled != "yes") {
if ($user->banned == 'yes' && !Core\Session::isAdmin()) {
return Factory::response([
'status' => 'error',
'message' => 'Sorry, this user is disabled',
'guid' => (string) $user->guid,
'blocked' => $block->isBlocked($user),
'type' => 'ChannelDisabledException',
'status'=>'error',
'message'=>'This user has been banned',
'type'=>'ChannelBannedException',
]);
}
......@@ -139,7 +134,8 @@ class channel implements Interfaces\Api
}
}
$response['channel']['blocked'] = $isBlocked;
$block = Core\Security\ACL\Block::_();
$response['channel']['blocked'] = $block->isBlocked($user);
if ($user->isPro()) {
/** @var Core\Pro\Manager $manager */
......
......@@ -737,7 +737,6 @@ class ElggUser extends ElggEntity
'featured_id',
'banned',
'ban_reason',
'enabled',
));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment