Diseño y Posicionamiento Web con Joomla › Foros › General › Joomla en General › Prohibición de símbolos al registrarse J15[RTO] › Re:Prohibición de símbolos al registrarse J15
No estoy seguro de si funcionaria pero en libraries/joomla/user/user.php encontramos esto:
// Check that username is not greater than 25 characters
$username = $this->get( ‘username’ );
if ( strlen($username) > 150 )
{
$username = substr( $username, 0, 150 );
$this->set( ‘username’, $username );
}
Quizás si ahí le añadimos que controle tambien la aparicion de esos simbolos consigas tu proposito, por lo pronto podría ser algo así…
// Check that username is not greater than 25 characters and many simbols not appear in the string
$username = $this->get( ‘username’ );
$ilegal = array(‘&’,’%’,’$’);
$result = strrpos($username, $ilegal);
if ( strlen($username) > 150 && $result != false)
{
$username = substr( $username, 0, 150 );
$this->set( ‘username’, $username );
}
No se si funcionaria es solo una idea…