summaryrefslogtreecommitdiff
path: root/actions/register.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-17 13:03:33 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-04-17 13:57:50 -0700
commit1cb5490943582f10a3ad52720ca339b4847e4914 (patch)
treee31a1cdbdeb28b1f0e235c3c38242de3f88a0408 /actions/register.php
parent0e6da4f1be4384155a38b2702e2ec39c96f5c359 (diff)
incorrect variable access
Diffstat (limited to 'actions/register.php')
-rw-r--r--actions/register.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/actions/register.php b/actions/register.php
index 4ac7c349d..033cf557f 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -63,13 +63,14 @@ class RegisterAction extends Action
* @return string title
*/
- function prepare()
+ function prepare($args)
{
+ parent::prepare($args);
$this->code = $this->trimmed('code');
if (empty($this->code)) {
common_ensure_session();
- if (!empty($_SESSION['invitecode'])) {
+ if (array_key_exists('invitecode', $_SESSION)) {
$this->code = $_SESSION['invitecode'];
}
}
@@ -80,7 +81,7 @@ class RegisterAction extends Action
}
if (!empty($this->code)) {
- $this->invite = Invitation::staticGet($code);
+ $this->invite = Invitation::staticGet('code', $this->code);
if (empty($this->invite)) {
$this->clientError(_('Sorry, invalid invitation code.'));
return false;