1
adium
register only if army.mil
  • 2007/6/14 0:07

  • adium

  • Just popping in

  • Posts: 99

  • Since: 2005/1/18


I want to know is there a way to make it so that someone can only register for the site if they have an e-mail from a specific domain such as army.mil? I want to make a site for soldiers only and want to keep it to be only soldiers that can have an account.

-Thanks

2
MadFish
Re: register only if army.mil
  • 2007/6/14 2:13

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


In admin => preferences => user info settings there is a field called "Enter emails that should not be used in user profile."

It is regex enabled, so maybe it is possible add an entry that will say 'is not *@army.mil'. Someone who knows regex might be able to confirm?

If you enable user activation by email, but only let the .mil addresses be used, then you should get the limit you want.

3
vaughan
Re: register only if army.mil
  • 2007/6/14 7:10

  • vaughan

  • Friend of XOOPS

  • Posts: 680

  • Since: 2005/11/26


alternatively if you can't find a regex.

enter *@army.mil in the dissallowed email field as madfish suggests. but

open register.php

find:

if (!empty($be) && preg_match("/".$be."/i"$email)) {
            
$stop .= _US_INVALIDMAIL.'';
            break;


replace with:

if (!empty($be) && !preg_match("/".$be."/i"$email)) {
            
$stop .= _US_INVALIDMAIL.'';
            break;


the '!' before preg_match will now work opposite, essentially turning the dissallowed email preference into allowed emails only.. any other that is not in the list would then fail.

4
adium
Re: register only if army.mil
  • 2007/8/2 12:33

  • adium

  • Just popping in

  • Posts: 99

  • Since: 2005/1/18


How would I do this with XOOPS 2.2

I have to use this version to be able to set permissions on the profiles.

5
davidl2
Re: register only if army.mil
  • 2007/8/2 12:39

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


You could get the same flexibility on profiles by using 2.0.16 and SmartProfile... which was based on the 2.2 Profiling, but enhanced further.

6
adium
Re: register only if army.mil
  • 2007/8/2 16:32

  • adium

  • Just popping in

  • Posts: 99

  • Since: 2005/1/18


I am wanting to prohibit anyone from viewing the profiles all together, and only allow soldiers to access the site.

7
adium
Re: register only if army.mil
  • 2007/8/5 9:36

  • adium

  • Just popping in

  • Posts: 99

  • Since: 2005/1/18


I still need help with this

8
attock
Re: register only if army.mil
  • 2007/8/5 15:09

  • attock

  • Not too shy to talk

  • Posts: 138

  • Since: 2006/8/20


If you don;t want any one who is not registered to browse, some or all parts of, your websites then you can goto

admin >> groups >> anonymous users >> modify

there you can choose the modules\block\etc that you dont want anonymous users to view.

Alternatively, you can do the same for registered members. i.e. you can block their access to modules\blocks of your choice. However in this case you would goto -> admin >> groups >> registered users >> modify

9
adium
Re: register only if army.mil
  • 2007/8/18 5:36

  • adium

  • Just popping in

  • Posts: 99

  • Since: 2005/1/18


This method will work if I want to block them from viewing a block. However I want to block access to the profiles for non-registered users. This will also help keep BOTS from coming to the site and phishing for e-mail addresses. Not everyone hides there e-mail.

I want the public to view the forum, but only the military to post too it. At the same time I want to protect the profiles for the members from the public eye..., especially reporters.

In short, I want the ability you have with the profiles like in XOOPS 2.2, but a method where I can use the hack above for XOOPS 2.0.16. I don't care which version I use, I mainly want a forum with news and an articles section.

10
adium
Re: register only if army.mil
  • 2007/8/24 15:20

  • adium

  • Just popping in

  • Posts: 99

  • Since: 2005/1/18


bump

Login

Who's Online

360 user(s) are online (283 user(s) are browsing Support Forums)


Members: 0


Guests: 360


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits