From a564af4948448a4a15d1c24e5bdd739b66cf49b0 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 17 Apr 2011 19:28:22 -0400 Subject: [PATCH] get email for code --- plugins/EmailRegistration/emailregister.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/EmailRegistration/emailregister.php b/plugins/EmailRegistration/emailregister.php index 6d5adf62ba..e87fd60faa 100644 --- a/plugins/EmailRegistration/emailregister.php +++ b/plugins/EmailRegistration/emailregister.php @@ -236,11 +236,17 @@ class EmailregisterAction extends Action function confirmRegistration() { - $nickname = $this->nicknameFromEmail($this->email); + if (!empty($this->invitation)) { + $email = $this->invitation->address; + } else if (!empty($this->confirmation)) { + $email = $this->confirmation->address; + } + + $nickname = $this->nicknameFromEmail($email); $this->form = new ConfirmRegistrationForm($this, $nickname, - $this->email, + $email, $this->invitation->code); $this->showPage(); } @@ -356,7 +362,7 @@ class EmailregisterAction extends Action $nickname = preg_replace('/[^A-Za-z0-9]/', '', $str); - $nickname = Nickname::normalize($parts[0]); + $nickname = Nickname::normalize($nickname); $original = $nickname; -- 2.39.5