Jump to content

Registration: block if Display Name contains specifics words


DreamOn

Recommended Posts

18 minutes ago, DreamOn said:

Thanks, that's not what I'm looking for so 😕

Do you know which class or function should I modify (with a plugin) to verify the display name when registering?

What do you mean by verifying the display name? It already does that. 

Link to comment
Share on other sites

The setting just ban member after registration:

public function profileSync()
{	
    [...]
    foreach ( \IPS\Db::i()->select( 'ban_content', 'core_banfilters', array( "ban_type=?", 'email' ) ) as $bannedEmail )
    {	 			
        if ( preg_match( '/^' . str_replace( '\*', '.*', preg_quote( $bannedEmail, '/' ) ) . '$/i', $this->value ) )
        {
            throw new \DomainException( 'form_email_banned' );
        }
    }

 

Edited by DreamOn
Link to comment
Share on other sites

6 minutes ago, Nathan Explosion said:

No, it doesn't - it validates the display name while the user is trying to register:

image.png.ecacd0a5c899777386302954ddd7269e.png

 

OK thanks, I thought it checked after member registered!

---

But I need to create a plugin because I want to use a list of forbidden words from txt file 🙂

It would be too long for me to add all forbidden words.

Edited by DreamOn
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...