PHPackages                             networkrailbusinesssystems/user-login - 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. networkrailbusinesssystems/user-login

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

networkrailbusinesssystems/user-login
=====================================

Provide user login with active directory account with minimal overhead

4.0.2(1mo ago)01.4kMITPHPPHP ^8

Since Oct 21Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/Network-Rail-Business-Systems/user-login)[ Packagist](https://packagist.org/packages/networkrailbusinesssystems/user-login)[ Docs](https://github.com/Network-Rail-Business-Systems/user-login)[ RSS](/packages/networkrailbusinesssystems-user-login/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (18)Versions (22)Used By (0)

User Login.
===========

[](#user-login)

This package provides user login functionality.

Built for [Laravel 11](https://laravel.com/).

Installation
------------

[](#installation)

Add the library using Composer:

```
composer require networkrailbusinesssystems/user-login

```

The service provider will be automatically registered.

Configuration
-------------

[](#configuration)

#### 1. Export the config file

[](#1-export-the-config-file)

To customize the package, export the configuration file using Artisan:

```
php artisan vendor:publish --provider="NetworkRailBusinessSystems\UserLogin\Providers\UserLoginServiceProvider" --tag=config

```

#### 2. Publish the views.

[](#2-publish-the-views)

To modify the login views, publish the package views using Artisan:

```
php artisan vendor:publish --provider="NetworkRailBusinessSystems\UserLogin\Providers\UserLoginServiceProvider" --tag=views

```

#### 3. Available Configuration Options

[](#3-available-configuration-options)

After publishing, you can modify the following configuration options in the config/user-login.php file:

OptionTypeDefaultUsageviewstringgov-uk-loginCustomise the view to be used for the login pageauth-identifierstringsamaccountnameCustomise the attribute used for authenticationlocal-email-indentiferstringemailCustomise the email attribute for the user in local modellocal-modelclass\\App\\Models\\User::classCustomise the class for local userlocal-model-identifierstringusernameCustomise the attribute identifies the user in local modellocal-unique-identifierstringguidCustomise the unique attribute identifies the user in local modelldap-modelclass\\LdapRecord\\Models\\ActiveDirectory\\User::classCustomise the class for LDAP userldap-model-identifierstringsamaccountnameCustomise the attribute identifies the user in LDAP modelldap-unique-identifierstringobjectguidCustomise the unique attribute identifies the user in LDAP modellogin-failed-messagestringSign-in failed; check your details and try again.Customise the message for login failurelogin-success-messagestringYou have successfully signed in.Customise the message for login successforgot-passwordarray'description' =&gt; null, routes =&gt; \['label' =&gt; 'name'\]Customise the "Forgot Password" section in view
You can set a description and routes for IT helpdesk or password reset.Routing
-------

[](#routing)

A route macro is provided to handle the login.

```
Route::userLogin();

```

interface: ExistingUser
-----------------------

[](#interface-existinguser)

The `ExistingUser` interface defines an abstract function for retrieving the unique identifier

Trait: HasGuidInDatabase
------------------------

[](#trait-hasguidindatabase)

The `HasGuidInDatabase` trait provides a method `uniqueIdentifier` to fetch a user unique identifier (like a GUID) from your local database.

Trait: HasGuidInLdap
--------------------

[](#trait-hasguidinldap)

The `HasGuidInLdap` trait provides a method `uniqueIdentifier` to fetch a user unique identifier (like a objectguid) from LDAP.

uniqueIdentifier($username)
---------------------------

[](#uniqueidentifierusername)

- $username: This is the value used to authenticate the user.
- The method returns the user GUID if found, or null if no match is found.

Usage
-----

[](#usage)

The package handles user routing and validation without requiring a custom Login Controller and Login Request.

### How to Set Up the Login Functionality

[](#how-to-set-up-the-login-functionality)

To get the user login functionality up and running, follow these steps:

1. In your User model or any other model you want to use for authentication, must implement the `ExistingUser` interface and use one of the provided traits (HasGuidInLdap, HasGuidInDatabase) to retrieve the unique identifier.

```
class User extends Model implements ExistingUser
{
    use HasGuidInLdap;

    // Other logic...
}

```

2. Add the following route macro to your routes/web.php file to handle the login routes automatically.

```
Route::userLogin();

```

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance93

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.8% 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.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~48 days

Total

18

Last Release

36d ago

Major Versions

1.1.3 → 2.0.02025-04-11

2.0.0 → 3.0.02025-10-03

2.1.0 → 3.0.12025-11-13

3.0.2 → 4.0.02026-02-10

PHP version history (2 changes)1.0.0PHP ^8.3

2.0.0PHP ^8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17785811?v=4)[Anthony Edmonds](/maintainers/AnthonyEdmonds)[@AnthonyEdmonds](https://github.com/AnthonyEdmonds)

![](https://avatars.githubusercontent.com/u/26721392?v=4)[AmbreenJamal](/maintainers/AmbreenJamal)[@AmbreenJamal](https://github.com/AmbreenJamal)

---

Top Contributors

[![AmbreenJamal](https://avatars.githubusercontent.com/u/26721392?v=4)](https://github.com/AmbreenJamal "AmbreenJamal (59 commits)")[![AnthonyEdmonds](https://avatars.githubusercontent.com/u/17785811?v=4)](https://github.com/AnthonyEdmonds "AnthonyEdmonds (19 commits)")[![SimRoberts9](https://avatars.githubusercontent.com/u/124249635?v=4)](https://github.com/SimRoberts9 "SimRoberts9 (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/networkrailbusinesssystems-user-login/health.svg)

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

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.0k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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