PHPackages                             tigo/login-session - 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. tigo/login-session

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

tigo/login-session
==================

login using the session feature

v0.0.1(4y ago)02MITPHPPHP &gt;= 7.2

Since Aug 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tigoCaval/login-session)[ Packagist](https://packagist.org/packages/tigo/login-session)[ Fund](https://www.paypal.com/donate?hosted_button_id=6QVW2XQEATS3U)[ Fund](https://www.paypal.com/donate?hosted_button_id=7GRD56DFDZWR4)[ RSS](/packages/tigo-login-session/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Login Session
=============

[](#login-session)

Creating session for login in PHP

- MIT license. ***Feel free to use this project***. ***Leave a star ⭐ !***
- Download package: `composer require tigo/login-session`

*If you found this project useful, consider making a donation to support the developer.*

[![paypal](https://camo.githubusercontent.com/bbd11cbf153bfc86cad262d7f7f7c77bc265322f5345d07dea2218ef446bfb20/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f70745f42522f692f62746e2f62746e5f646f6e6174655f534d2e676966)](https://www.paypal.com/donate?hosted_button_id=6QVW2XQEATS3U)| [![paypal](https://camo.githubusercontent.com/7b6de155df30b37b25eb5fec52f9213680c3dbf067dfb7d7e2850ac4096c7d05/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e6174655f534d2e676966)](https://www.paypal.com/donate?hosted_button_id=7GRD56DFDZWR4)

Introduction
------------

[](#introduction)

Somewhere in your project, you may need to use autoload

```
include __DIR__ ."/vendor/autoload.php";
```

### Example

[](#example)

- Configuration:

```
 In the src/config/Standard.php directory

```

- In the Standard class there is a method called postLogin(), it is through it that you will implement your logic.
- By default the postLogin() method has an implemented logic which receives data from an array, to perform post validation

```
// the function must return a boolean value.
public function postLogin()
{
       $user = isset($_POST[self::USER]) ? $_POST[self::USER] : false;
       $pw =   isset($_POST[self::PW]) ? md5($_POST[self::PW]) : false;
       $table = TestMatrix::table();
       foreach ($table as $key => $item) {

            if($user == $item->user && $pw == $item->password){
               $_SESSION[self::SESSION] = $_POST[self::USER];
               return true;
            }
       }
       return false;
  }
```

Method TestMatrix::table()

```
  public static function table()
  {
      return [
          1=> (object) ["user"=>"admin","password"=>md5("123")],
          2=> (object) ["user"=>"admin2","password"=>md5("1234")],
          3=> (object) ["user"=>"admin3","password"=>md5("12345")]
      ];
  }
```

Example methods

```
use Tigo\LoginSession\Login; // import class
$login = new Login();
$login->validate();
```

   Method Description   validate() This method is responsible for validating the login.   auth() On a private page where the user must be logged in, you can use this method in the page controller or on the page itself.   logout() Use this method to destroy session or logout.   user() Use this method to collect session information.  Problems
--------

[](#problems)

If you discover any issues, please contact my email or issue tracker and post the details.

Contributors
------------

[](#contributors)

- [List of contributors](https://github.com/tigoCaval/login-session/graphs/contributors)

License
-------

[](#license)

MIT license. See the archive [License](https://github.com/tigoCaval/login-session/blob/main/LICENSE)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1748d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f4b80fc9ba8d77c8b32d353d540dbd116ca6402f693e132aa7b1c21c15db39f?d=identicon)[tigopereira](/maintainers/tigopereira)

---

Top Contributors

[![tigoCaval](https://avatars.githubusercontent.com/u/19934116?v=4)](https://github.com/tigoCaval "tigoCaval (16 commits)")

---

Tags

loginlogin-phpsessionlogin

### Embed Badge

![Health badge](/badges/tigo-login-session/health.svg)

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

###  Alternatives

[overtrue/socialite

A collection of OAuth 2 packages.

1.4k5.5M87](/packages/overtrue-socialite)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M68](/packages/auth0-auth0-php)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[cesargb/laravel-magiclink

Create secure link for access to private data or login in Laravel without password

4571.3M](/packages/cesargb-laravel-magiclink)[socialconnect/auth

Social Connect Auth Component

568845.4k5](/packages/socialconnect-auth)[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128738.1k](/packages/auth0-symfony)

PHPackages © 2026

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