Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing style test
  • Loading branch information
zachmullen committed Jul 11, 2014
1 parent af601f1 commit 12f984f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/controllers/UserController.php
Expand Up @@ -193,20 +193,20 @@ function ajaxregisterAction()
if($this->_request->isPost())
{
$nopass = (bool)$this->_getParam('nopassword');
if ($adminCreate && $nopass)
if($adminCreate && $nopass)
{
$form->populate($this->getRequest()->getPost());
$passwd = UtilityComponent::generateRandomString(32);
$form->getElement('password1')->setValue($passwd);
$form->getElement('password2')->setValue($passwd);

if (!$form->getValue('firstname') && !$form->getValue('lastname'))
if(!$form->getValue('firstname') && !$form->getValue('lastname'))
{
$form->getElement('firstname')->setValue('[Invited');
$form->getElement('lastname')->setValue('User]');
}
}
else if (!$form->isValid($this->getRequest()->getPost()))
else if(!$form->isValid($this->getRequest()->getPost()))
{
echo JsonComponent::encode(array('status' => 'error',
'message' => 'Registration failed',
Expand Down Expand Up @@ -234,7 +234,7 @@ function ajaxregisterAction()
$body = "An administrator has created a user account for you at the following Midas instance:<br/><br/>";
$body .= '<a href="'.$url.'">'.$url.'</a><br/><br/>';

if (!$nopass)
if(!$nopass)
{
$body .= "Log in using this email address (".$email.") and your initial password:<br/><br/>";
$body .= '<b>'.$form->getValue('password1').'</b><br/><br/>';
Expand Down

0 comments on commit 12f984f

Please sign in to comment.