I am currently developing a website that will cater for a community of medical students. As the topics discussed on the site will be of a sensitive nature, I want to restrict user registration so that it only allows e-mail addresses of our university. Basically, I need to block all e-mail addresses apart from @university.ac.uk. I've searched for what kind of string I should put in the 'Block' field of Access Control but have failed miserably.

Any help would be greatly appreciated.

Comments

Zen’s picture

In "admin/access/rules", try adding an allow email rule for:

"%@university.ac.uk"

and a deny rule for ALL others:

"%"

and see what happens :) The order shouldn't matter, but if it fails, try switching the order around..

Let us know :)
-K

MedSoc’s picture

I tried that, Zen, but it blocked all e-mails.

I cracked it by denying "%@%" and allowing "%@university.ac.uk".

It was quite simple in the end. ;)

Thanks for your help.

ahashim’s picture

I think you need php coder to do this job.
Simply edit the validate email function in the user registration to accept the email pattern you want.

I am not php man :) so, i can't code it.

--
Ahmed Hashim
Egypt