makes invites work for opt-out sites
This commit is contained in:
parent
86ea303e4e
commit
778d75e6f0
|
@ -224,8 +224,12 @@ class QvitterPlugin extends Plugin {
|
||||||
'qvitter');
|
'qvitter');
|
||||||
}
|
}
|
||||||
|
|
||||||
// if qvitter is opt-out, disable the default register page
|
// if qvitter is opt-out, disable the default register page (if we don't have a valid invitation code)
|
||||||
if(self::settings('enabledbydefault')) {
|
$code = $_POST['code'];
|
||||||
|
if(!empty($code)) {
|
||||||
|
$valid_code = Invitation::getKV('code', $code);
|
||||||
|
}
|
||||||
|
if(self::settings('enabledbydefault') && empty($valid_code)) {
|
||||||
$m->connect('main/register',
|
$m->connect('main/register',
|
||||||
array('action' => 'qvitter'));
|
array('action' => 'qvitter'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user