Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Preaprove members with a certain email address?

Aloittaja BAlGaInTl, toukokuu 30, 2005, 12:20:42 IP

« edellinen - seuraava »

BAlGaInTl

I'm currently setting up a private forum.

I would like to be able to set up a list of approved email addresses, and when a member tries to create an account using that email address, it is automatically approved.

Is this possible?

The reason is that we currently have around 150 members that are on a mailing list, and there is a lot of crap that goes out to everyone.  Instead of using that method, I thought we could use a forum format with different categories so that people can read, respond and subscribe to whatever they like.

Thoughts on this?

I suppose that I could manually create accounts for everyone and give them the ability to change their username, but that seems like a hassle.

[Unknown]

Find in Sources/Register.php:

// Some of these might be overwritten. (the lower ones that are in the arrays below.)

Add above it:

$emails = array(
   '[email protected]',
   '[email protected]',
   '[email protected]',
...
   '[email protected]',
   '[email protected]',
   '[email protected]',
);


And then find:

'is_activated' => empty($modSettings['registration_method']) || (!isset($_POST['emailActivate']) && $user_info['is_admin']) ? 1 : 0,

Change to:

'is_activated' => in_array($_POST['email'], $emails) || empty($modSettings['registration_method']) || (!isset($_POST['emailActivate']) && $user_info['is_admin']) ? 1 : 0,

Find:

if (empty($modSettings['registration_method']))

Replace:

if (in_array($_POST['email'], $emails) || empty($modSettings['registration_method']))

How do I modify files?

-[Unknown]

Advertisement: