Skip to content

Commit

Permalink
Block banned users & spammers
Browse files Browse the repository at this point in the history
  • Loading branch information
wohali committed Aug 8, 2017
1 parent 5565d3f commit 2a307b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"102003": "1.2.3",
"102004": "1.2.4",
"103000": "1.3.0",
"104000": "1.4.0"
"104000": "1.4.0",
"104010": "1.4.1"
}
5 changes: 5 additions & 0 deletions interface/oauth/authorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=system&controller=login&ref=' . $ref, 'front', 'login' ) );
}

$member = \IPS\Member::loggedIn();
if ( $member === NULL or $member->isBanned() or $member->members_bitoptions['bw_is_spammer'] ) {
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( '' ) );
}

// setup storage and new server
$storage = new \IPS\oauth2server\Storage( \IPS\Db::i() );
$server = \IPS\oauth2server\Server::createServer($storage);
Expand Down

0 comments on commit 2a307b5

Please sign in to comment.