src/Neuron/GameServer/Windows/MyAccount.php
private function getChangePassword ()
	{
		$input = $this->getInputData ();
		$login = Neuron_Core_Login::__getInstance ();
	
		$page = new Neuron_Core_Template ();
		
		// Check for input
		$pass1 = isset ($input['newPassword1']) ? $input['newPassword1'] : null;
		$pass2 = isset ($input['newPassword2']) ? $input['newPassword2'] : null;
		
		if (!empty ($pass1) && $pass1 && $pass2)
		{
			if ($pass1 == $pass2)
			{
				// Try to change the password
				if ($login->doChangePassword ($pass1))
				{
					$page->set ('success', 'changed');
				}
				else
				{
					$page->set ('error', $login->getError ());
				}
			}
			else
			{
				$page->set ('error', 'password_mismatch');
			}
		}
		
		return $page->parse ('gameserver/account/changePass.phpt');
	}
private function getChangePassword ()
	{
		$input = $this->getInputData ();
		$login = Neuron_Core_Login::__getInstance ();
	
		$page = new Neuron_Core_Template ();
		
		// Check for input
		$pass1 = isset ($input['newPassword1']) ? $input['newPassword1'] : null;
		$pass2 = isset ($input['newPassword2']) ? $input['newPassword2'] : null;
		
		if (!empty ($pass1) && $pass1 && $pass2)
		{
			if ($pass1 == $pass2)
			{
				// Try to change the password
				if ($login->doChangePassword ($pass1))
				{
					$page->set ('success', 'changed');
				}
				else
				{
					$page->set ('error', $login->getError ());
				}
			}
			else
			{
				$page->set ('error', 'password_mismatch');
			}
		}
		
		return $page->parse ('gameserver/account/changePass.phpt');
	}
private function getChangePassword ( ) { $ input = $ this -> getInputData ( ) ; $ login = Neuron_Core_Login :: __getInstance ( ) ; $ page = new Neuron_Core_Template ( ) ; // Check for input $ pass1 = isset ( $ input [ 'newPassword1' ] ) ? $ input [ 'newPassword1' ] : null ; $ pass2 = isset ( $ input [ 'newPassword2' ] ) ? $ input [ 'newPassword2' ] : null ; if ( ! empty ( $ pass1 ) && $ pass1 && $ pass2 ) { if ( $ pass1 == $ pass2 ) { // Try to change the password if ( $ login -> doChangePassword ( $ pass1 ) ) { $ page -> set ( 'success' , 'changed' ) ; } else { $ page -> set ( 'error' , $ login -> getError ( ) ) ; } } else { $ page -> set ( 'error' , 'password_mismatch' ) ; } } return $ page -> parse ( 'gameserver/account/changePass.phpt' ) ; }
/*
Returns the HTML for changing password
/ * Returns the HTML for changing password