protected function CreateNewUserConfirm()
	{
		if (!$this->_login->getCanRegister())
		{
			$this->FormLogin();
			return;
		}
		$myWords = $this->WordCollection();
		$container = new XmlnukeUIAlert($this->_context, UIAlert::BoxAlert);
		$container->setAutoHide(5000);
		$this->_blockCenter->addXmlnukeObject($container);

		if (($this->_login->getName() == "") || ($this->_login->getEmail() == "") || ($this->_login->getUsername() == "") ||
			!Util::isValidEmail($this->_login->getEmail()))
		{
			$container->addXmlnukeObject(new XmlnukeText($myWords->Value("INCOMPLETEDATA"), true));
			$this->CreateNewUser();
		}
		elseif (!XmlInputImageValidate::validateText($this->_context))
		{
			$container->addXmlnukeObject(new XmlnukeText($myWords->Value("OBJECTIMAGEINVALID"), true));
			$this->CreateNewUser();
		}
		else
		{
			$newpassword = $this->getRandomPassword();
			if (!$this->_users->addUser( $this->_login->getName(), $this->_login->getUsername(), $this->_login->getEmail(), $newpassword ) )
			{
				$container->addXmlnukeObject(new XmlnukeText($myWords->Value("CREATEUSERFAIL"), true));
				$this->CreateNewUser();
			}
			else
			{
				$this->sendWelcomeMessage($myWords, $this->_context->get("name"), $this->_context->get("newloguser"), $this->_context->get("email"), $newpassword );
				$this->_users->Save();
				$container->addXmlnukeObject(new XmlnukeText($myWords->Value("CREATEUSEROK"), true));
				$container->setUIAlertType(UIAlert::BoxInfo);
				$this->FormLogin($block);
			}
		}
	}
protected function CreateNewUserConfirm()
	{
		if (!$this->_login->getCanRegister())
		{
			$this->FormLogin();
			return;
		}
		$myWords = $this->WordCollection();
		$container = new XmlnukeUIAlert($this->_context, UIAlert::BoxAlert);
		$container->setAutoHide(5000);
		$this->_blockCenter->addXmlnukeObject($container);

		if (($this->_login->getName() == "") || ($this->_login->getEmail() == "") || ($this->_login->getUsername() == "") ||
			!Util::isValidEmail($this->_login->getEmail()))
		{
			$container->addXmlnukeObject(new XmlnukeText($myWords->Value("INCOMPLETEDATA"), true));
			$this->CreateNewUser();
		}
		elseif (!XmlInputImageValidate::validateText($this->_context))
		{
			$container->addXmlnukeObject(new XmlnukeText($myWords->Value("OBJECTIMAGEINVALID"), true));
			$this->CreateNewUser();
		}
		else
		{
			$newpassword = $this->getRandomPassword();
			if (!$this->_users->addUser( $this->_login->getName(), $this->_login->getUsername(), $this->_login->getEmail(), $newpassword ) )
			{
				$container->addXmlnukeObject(new XmlnukeText($myWords->Value("CREATEUSERFAIL"), true));
				$this->CreateNewUser();
			}
			else
			{
				$this->sendWelcomeMessage($myWords, $this->_context->get("name"), $this->_context->get("newloguser"), $this->_context->get("email"), $newpassword );
				$this->_users->Save();
				$container->addXmlnukeObject(new XmlnukeText($myWords->Value("CREATEUSEROK"), true));
				$container->setUIAlertType(UIAlert::BoxInfo);
				$this->FormLogin($block);
			}
		}
	}
protected function CreateNewUserConfirm ( ) { if ( ! $ this -> _login -> getCanRegister ( ) ) { $ this -> FormLogin ( ) ; return ; } $ myWords = $ this -> WordCollection ( ) ; $ container = new XmlnukeUIAlert ( $ this -> _context , UIAlert :: BoxAlert ) ; $ container -> setAutoHide ( 5000 ) ; $ this -> _blockCenter -> addXmlnukeObject ( $ container ) ; if ( ( $ this -> _login -> getName ( ) == "" ) || ( $ this -> _login -> getEmail ( ) == "" ) || ( $ this -> _login -> getUsername ( ) == "" ) || ! Util :: isValidEmail ( $ this -> _login -> getEmail ( ) ) ) { $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "INCOMPLETEDATA" ) , true ) ) ; $ this -> CreateNewUser ( ) ; } elseif ( ! XmlInputImageValidate :: validateText ( $ this -> _context ) ) { $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "OBJECTIMAGEINVALID" ) , true ) ) ; $ this -> CreateNewUser ( ) ; } else { $ newpassword = $ this -> getRandomPassword ( ) ; if ( ! $ this -> _users -> addUser ( $ this -> _login -> getName ( ) , $ this -> _login -> getUsername ( ) , $ this -> _login -> getEmail ( ) , $ newpassword ) ) { $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "CREATEUSERFAIL" ) , true ) ) ; $ this -> CreateNewUser ( ) ; } else { $ this -> sendWelcomeMessage ( $ myWords , $ this -> _context -> get ( "name" ) , $ this -> _context -> get ( "newloguser" ) , $ this -> _context -> get ( "email" ) , $ newpassword ) ; $ this -> _users -> Save ( ) ; $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "CREATEUSEROK" ) , true ) ) ; $ container -> setUIAlertType ( UIAlert :: BoxInfo ) ; $ this -> FormLogin ( $ block ) ; } } }
Confirm New user
Confirm New user