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.

s2Member® Restriction Options Unique Ip

Home Forums Community Forum s2Member® Restriction Options Unique Ip

This topic contains 5 replies, has 3 voices. Last updated by  brad hue 4 years, 5 months ago.

Topic Author Topic
Posted: Saturday Jul 21st, 2012 at 10:42 am #19900

So i been using this plugin a long time and well it claims that it will punish them for 4 days… i have more then 100,000 accounts i cannot go check each one… Why is this not resetting after 4 days? Also is there not a way to see the list of ip’s that user used so i can prove to them that they are going over the limit?

Thanks

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Sunday Jul 22nd, 2012 at 6:43 am #19928

Hi Brad.

I emailed Jason asking these.

Posted: Monday Jul 23rd, 2012 at 8:43 pm #20023

Thanks ill hang tough

Posted: Saturday Jul 28th, 2012 at 5:44 pm #20562
Staff Member

Thanks for the heads up on this request for support.

I’m sorry, but there’s not currently a UI for browsing IPs associated with security breaches. The closest you can get in the UI, is to pull up the user’s account in WordPress, and then check the box to reset IP Restrictions for a specific user. It’s also possible to reset all IP Restrictions from the s2Member -> Restriction Options panel.

Until this feature becomes possible, here’s a function that pulls the information (based on username), in case you’d like to integrate something of your own.

<?php
function s2_login_ips_for($username)
{
	$ips = get_transient('s2m_ipr_'.md5('s2member_ip_restrictions_'.strtolower($username).'_entries'));
	
	// This returns an associative array containing all IPs the user has logged in with, over the last 30 days.
	// Array keys are IP addresses, and array values are timestamps.
	return (is_array($ips)) ? $ips : array();
}
?>

Example usage:

<?php
$user_id = 1;
$user = new WP_User($user_id);
$username = $user->user_login;

foreach(s2_login_ips_for($username) as $ip => $time)
	echo 'You logged in at '.date(DATE_RFC822, $time).' from: '.$ip.'<br />';
?>
Posted: Saturday Jul 28th, 2012 at 5:48 pm #20563
Staff Member

Regarding restrictions NOT being reset…

I’ve seen this happen on servers that report $_SERVER['REMOTE_ADDR'] incorrectly. I suggest running this test script on your site, to make sure that your server is indeed reporting the user’s IP address correctly. Otherwise, s2Member might be recording the same IP for multiple users, causing lots of accounts to go over your threshold for unique IPs allowed.

Run this test script on the server please. Does this accurately report your IP address?

<?php
echo $_SERVER&#91;'REMOTE_ADDR'&#93;;
?>
Posted: Saturday Jul 28th, 2012 at 10:13 pm #20578

Thanks ill look into that all :)

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.