Skip to content

Commit 96f267e

Browse files
authored
SMF Fixes (#31)
* Fixed registeration redirect on SMF 2.1 * Fixed banned users Signed-off-by: Mustafa Can Elmacı <mustafacan@elmaci.net>
1 parent 1d10d0d commit 96f267e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ForumProvider/smf2.0.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public function legacyUpdateWikiUser(array $member, object $wikiUser): bool
313313
*/
314314
public function checkBans(array $member): bool
315315
{
316-
$banned = isset($profile['is_activated']) ? $profile['is_activated'] >= 10 : 0;
316+
$banned = isset($member['is_activated']) ? $member['is_activated'] >= 10 : 0;
317317

318318
if (empty($banned))
319319
$banned = $this->__check_basic_ban((int) $member['id_member']);

ForumProvider/smf2.1.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
*/
2222
class ForumSoftwareProvidersmf21 extends ForumSoftwareProvidersmf20
2323
{
24+
protected $validRedirectActions = [
25+
'createaccount' => 'signup',
26+
'userlogin' => 'login',
27+
'userlogout' => 'logout'
28+
];
29+
2430
/**
2531
* Decodes the forum software cookie returning the id and password.
2632
*
@@ -82,7 +88,7 @@ public function cookiePasswordIsValid(array $user, array $cookie): bool
8288
*/
8389
public function checkBans(array $member): bool
8490
{
85-
$banned = isset($profile['is_activated']) ? $profile['is_activated'] >= 10 : 0;
91+
$banned = isset($member['is_activated']) ? $member['is_activated'] >= 10 : 0;
8692

8793
if (empty($banned))
8894
$banned = $this->__check_basic_ban((int) $member['id_member']);

0 commit comments

Comments
 (0)