Bienvenido, Invitado
Nombre de Usuario: Contraseña: Recordarme

TEMA: Disable auto generate Guest_****

Disable auto generate Guest_**** 6 años 4 meses ago #20734

  • DDN
  • Avatar de DDN
  • Offline
  • Visitante
  • Mensajes: 2
  • Karma: 0
Hello!
Use pro version, and i want to disable autogenerate Guest_**** in login field (I think user should choose nick by him self + less spam).
Of course i can delete string
if ($user->id) {
			$this->name = $params->get("username", true) ? $user->username : $user->name;
		}
		else {
			if ($session->get("name", '', 'kide')) {
				$this->name = $session->get("name", '', 'kide');
			}
			else {
				$this->name = JText::_("COM_KIDE_INVITADO")."_".rand(1000,9999);
				$session->set("name", $this->name, 'kide');
			}

in helpers/user

but in this case user can send messages without any name! So... how i should restrict sending messages if user don't choosed name (if field "Name" are blank user see the message: "Please enter your Name".
El administrador ha desactivado la escritura pública.

Disable auto generate Guest_**** 6 años 3 meses ago #20739

  • JoniJnm
  • Avatar de JoniJnm
  • Offline
  • Administrador
  • Mensajes: 4579
  • Gracias recibidas 544
  • Karma: 160
Hi,

helpers/user.php
//change
$this->name = JText::_("COM_KIDE_INVITADO")."_".rand(1000,9999);
//by
$this->name = "";
js/base.js
//search
else if (tipo == "insertar") {
//add after
if (!kide.name) {
	alert('Please, define a username');
	return;
}
El administrador ha desactivado la escritura pública.
Tiempo de carga de la página: 0.129 segundos