latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

grant access via IP / IP-range

Home Forums Community Forum grant access via IP / IP-range

Tagged: , , ,

This topic contains 5 replies, has 2 voices. Last updated by  Wolf Galetzki 4 years, 6 months ago.

Topic Author Topic
Posted: Tuesday Mar 13th, 2012 at 11:02 am #7999

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Tuesday Mar 13th, 2012 at 3:50 pm #8039
David Welch
Username: dwbiz05

S2member is not really designed to work this way out of the box. It is assuming that the user will be creating an account via wordpress or a thirdparty software in the wp database.

However, you could use simple php conditionals on your pages (or even make your own shortcode to do this) using the s2member constant S2MEMBER_CURRENT_USER_IP.

Something like this maybe:

<?php
//IP Ranges
$lowest_ip = '100.100.5.0';
$highest_ip = '100.100.5.100';
	if(S2MEMBER_CURRENT_USER_IP >= $lowest_ip && S2MEMBER_CURRENT_USER_IP <= $highest_ip){
		//Show the info
		echo ' ';
	}
	else {
		//Show something else like an error
		echo ' ';
	}
?>

NOTE: if you are adding this to a page, you will need to enable a php execution plugin like this:

http://wordpress.org/extend/plugins/php-execution-plugin/

Hope that helps
Dave

Posted: Tuesday Mar 13th, 2012 at 8:35 pm #8067

Hi Dave!

Thank you für your help! That was the missing hint! ;-)
I will test it out… ;-)

Wolf

Posted: Wednesday Jun 13th, 2012 at 2:12 pm #16392

Hi !

It’s me again.. ;-)

The topic is beyond my abilities … :-/

Can someone explain exactly how to do it exactly, please?

Goal: user login via usr / pass OR IP / IP range …
Maintenance of IP addresses in the user list …
a user can have multiple IP addresses / ranges …

;-)

Thank you very much

Posted: Wednesday Jun 13th, 2012 at 2:29 pm #16393

… something like: http://wordpress.org/extend/plugins/force-login-except-special-ip-range/
But it should use the IP addresses and their roles registered in the user db…

Posted: Thursday Jun 14th, 2012 at 9:03 am #16468

Hi!

I found something ‘realy close’ …
http://www.primothemes.com/forums/viewtopic.php?f=4&t=15918

It seems to work… the only thing is, that i get a blank page..
I should be able to ‘review’ a list of ip adresses.

PLEASE – can anybody help me out? ;-)

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.