News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

restrict access by email

Started by moaltmann, July 17, 2004, 09:51:48 PM

Previous topic - Next topic

moaltmann

Hi,

I am a newbie but very much impressed with SMF. I've installed it and am planning to modify it to accommodate a bit more "personal" data in order to allow it to function as a basic Alumni Database.

I'd like to restrict certain areas (or even registration) to users with a certain email address (e.g. user that have emails @certain_domain.com). I know it is possible to hard-code this into the SMF code, however, I was wondering whether it could be implemented as a sort of "filter" (similar to the ban options just that you want to allow instead of ban certain domains/IPs

thanks, I appreciate your help,
  Mischa

moaltmann

I think I'll wait a bit before I hardcode the feature into my board. Until then I@ll use member groups. However, I found that IU cant simultaneously enable multiple users to view only certain part to the forum. neither can i select accessible forums in the member group configuration as they are all grayed out.

any help is very much appreciated -- i'll post agin if i figure something out...

ciao,
  Mischa Altmann

Tomer

Well if you want this as a future feature, try requesting it at "Feature Requests".

You can easily add a bit of code to your forum to get that result, something lke this to the registration file.


<?php

// Function to put everything after the @ into an variable called $email.

if ($email == "certain_domain.com")
   {
      echo 
"Error";
      exit;
   }

?>




yerg

Tomer where would you suggest I put this?

I have a forum where I need to restrict access to a specific government domain for registration. No address no can access.

Advertisement: