Allow IP Restrictions on User 1

bartclarkson - March 27, 2009 - 17:51
Project:Restrict Login Access by IP Address
Version:6.x-1.0-beta2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

User 1 might actually the user that tech wants tied to a couple of IP ranges the most, as it carries the keys to the kingdom.

This bypass might be an optional checkbox (variable_set('restrict_by_ip_restrict_user_1', '$checkbox_val')) on the settings form, carrying with it suitable warning.

@@ -97,7 +97,7 @@ function _restrict_by_ip_login(&$user
- if ($user -> uid > 1) {
+ if (($user -> uid == 1 && variable_get('restrict_by_ip_restrict_user_1', 'no') == 'yes') || $user -> uid > 1) {

 
 

Drupal is a registered trademark of Dries Buytaert.