PHPackages                             teppokoivula/user-restrictions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. teppokoivula/user-restrictions

ActivePw-module[Authentication &amp; Authorization](/categories/authentication)

teppokoivula/user-restrictions
==============================

00PHP

Since May 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/teppokoivula/UserRestrictions)[ Packagist](https://packagist.org/packages/teppokoivula/user-restrictions)[ RSS](/packages/teppokoivula-user-restrictions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

User Restrictions module for ProcessWire
========================================

[](#user-restrictions-module-for-processwire)

This module provides additional restrictions for users. As of this writing it can be used to restrict login attempts to the admin using a predefined set of IPs or geolocations.

Note: geolocation data is fetched from an external API, which may require credentials. This feature has been built with ipgeolocation.io in mind, but should technically work with any other service as well — as long as said service returns data in JSON format.

Configuration settings are defined via $config-&gt;UserRestrictions:

```
$config->UserRestrictions = [
	'login_restriction_enabled' => !$this->config->debug,
	'login_restriction_enabled_for' => [
		// array containing users that are restricted; supported formats:
		// 'my_admin_username' or 'user:my_admin_user' (username)
		// 41 or 'user:41' (user ID)
		// 'role:superuser' (role)
		// 'regex:/.*/' (regex pattern, which is matched against username)
	],
	'valid_ip_addresses' => [
		// list of valid IP addresses; supported formats:
		// '127.0.0.1' (individual IP)
		// '127.0.0.1-127.0.0.255' (IP range)
		// '127.0.0.0/24' (CIDR)
	],
	'valid_geolocations' => [
		// list of valid geolocations; supported formats:
		// 'Finland' or 'country:Finland' (country)
		// 'prefix:value' (any other valid geolocation data key)
	],
	'geolocation_api_url' => 'https://api.ipgeolocation.io/v2/ipgeo?apiKey={api_key}&ip={ip}',
	'geolocation_api_key' => '',
	'display_errors' => false,
	'log_errors' => true,
];

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4224e4c74fcea66b97377c3b32756fe54820135e573eb05a79b181783fe194df?d=identicon)[teppokoivula](/maintainers/teppokoivula)

---

Top Contributors

[![teppokoivula](https://avatars.githubusercontent.com/u/1252021?v=4)](https://github.com/teppokoivula "teppokoivula (1 commits)")

### Embed Badge

![Health badge](/badges/teppokoivula-user-restrictions/health.svg)

```
[![Health](https://phpackages.com/badges/teppokoivula-user-restrictions/health.svg)](https://phpackages.com/packages/teppokoivula-user-restrictions)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
