Jump to content

Topic on Extension talk:EmailDomainCheck

Refreshing mediawiki page will show "Your email address must end in"

1
Mickbravo (talkcontribs)

I added this extension to my mediawiki and it is perfect.

But a lot of times when I'm just browsing through my wiki at the top of the page the following sentence is shown. "Your email address must end in" It is on top of the logo, the wiki is fine and usable but it annoys me. Does anyone has this too? And preferably knows how to solve this.

Note: I changed the following for sake of being able to check on multiple domains

 
function efEmailDomainCheck( $user, &$error ) {
        global $wgEmailDomain;
 
        if ( isset( $wgEmailDomain ) ) {
 
                list( $name, $host ) = explode( "@", $user->getEmail() );
                //if ( efEndsWith( $host, $wgEmailDomain ) ) { // use this line to allow subdomains of $wgEmailDomain
                if (in_array ( $host , $wgEmailDomain )){
                //if ( $host == $wgEmailDomain ) {
                        return true;
                } else {
                        $error = wfMsgHtml( 'emaildomaincheck-error', join(" or ",$wgEmailDomain) );
                        return false;
                }
        }
}

In my LocalSettings.php I use this line:

 
$wgEmailDomain = array("domain1.com","domain2.com","domain3.com"); //Array of allowed domains

When I look into the source of a shown page it tells me this in the first line. Does anyone have a tip?

 
Your email address must end in <!DOCTYPE html>
Reply to "Refreshing mediawiki page will show "Your email address must end in""