mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-14 21:26:37 +00:00
Persist data between convention signups.
This commit is contained in:
parent
f6d786b92c
commit
c558e5b069
|
@ -80,6 +80,18 @@ class User extends \DF\Doctrine\Entity
|
|||
/** @Column(name="name", type="string", length=100, nullable=true) */
|
||||
protected $name;
|
||||
|
||||
/** @Column(name="legal_name", type="string", length=100, nullable=true) */
|
||||
protected $legal_name;
|
||||
|
||||
/** @Column(name="pony_name", type="string", length=100, nullable=true) */
|
||||
protected $pony_name;
|
||||
|
||||
/** @Column(name="phone", type="string", length=50, nullable=true) */
|
||||
protected $phone;
|
||||
|
||||
/** @Column(name="pvl_affiliation", type="string", length=50, nullable=true) */
|
||||
protected $pvl_affiliation;
|
||||
|
||||
/** @Column(name="title", type="string", length=100, nullable=true) */
|
||||
protected $title;
|
||||
|
||||
|
@ -114,9 +126,6 @@ class User extends \DF\Doctrine\Entity
|
|||
if (!($login_info instanceof self))
|
||||
return FALSE;
|
||||
|
||||
if ($login_info->flag_delete || $login_info->flag_suspend)
|
||||
return FALSE;
|
||||
|
||||
$hashed_password = sha1($password.$login_info->auth_password_salt);
|
||||
|
||||
if (strcasecmp($hashed_password, $login_info->auth_password) == 0)
|
||||
|
|
|
@ -150,9 +150,9 @@ class ConventionController extends \DF\Controller\Action
|
|||
|
||||
$record = ConventionSignup::getRepository()->findOneBy(array('convention_id' => $con->id, 'user_id' => $user->id));
|
||||
if ($record instanceof ConventionSignup)
|
||||
{
|
||||
$form->setDefaults($record->toArray());
|
||||
}
|
||||
else
|
||||
$form->setDefaults($user->toArray());
|
||||
|
||||
if ($_POST && $form->isValid($_POST))
|
||||
{
|
||||
|
@ -168,6 +168,15 @@ class ConventionController extends \DF\Controller\Action
|
|||
$record->fromArray($data);
|
||||
$record->save();
|
||||
|
||||
// Save some data to the user profile.
|
||||
$user->fromArray(array(
|
||||
'legal_name' => $data['legal_name'],
|
||||
'pony_name' => $data['pony_name'],
|
||||
'phone' => $data['phone'],
|
||||
'pvl_affiliation' => $data['pvl_affiliation'],
|
||||
));
|
||||
$user->save();
|
||||
|
||||
$this->alert('<b>Convention registration successfully submitted.</b><br>You will be contacted by the PVL administrators with more information.', 'green');
|
||||
$this->redirectFromHere(array('action' => 'signup', 'id' => NULL));
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user