PHPackages                             warleyelias/customer-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. warleyelias/customer-login

ActiveMagento2-module

warleyelias/customer-login
==========================

The Customer Login module provides the ability lock a customer account in magento 2

1.1.1(9mo ago)0232MITPHPPHP ^7||^8

Since Jul 21Pushed 9mo agoCompare

[ Source](https://github.com/warleyelias/customer-login)[ Packagist](https://packagist.org/packages/warleyelias/customer-login)[ RSS](/packages/warleyelias-customer-login/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

How to lock a customer account in magento 2
===========================================

[](#how-to-lock-a-customer-account-in-magento-2)

- When you work on a project, the client requires you to block a customer account from the backend, the client means preventing them from using their account. Then the customer can't be able to log in to their account. By default, Magento hasn't this functionality. You don't know how to complete this task, you are searching for a good solution. Today I show you the best codes to complete your task.
- We have the scenario: We will create a new customer attribute called "Blocked", it will have two options (Yes/No). If this attribute is set to "Yes" when a customer tries to log in, they will get an inform similar to this "Your account is blocked for the security reason, please contact us for details."

Screenshot
==========

[](#screenshot)

[![ScreenShot](https://github.com/php-cuong/customer-login/raw/main/Screenshot/lock-a-customer-account.gif)](https://github.com/php-cuong/customer-login/blob/main/Screenshot/lock-a-customer-account.gif)[![ScreenShot](https://github.com/php-cuong/customer-login/raw/main/Screenshot/muiltiple-rows.gif)](https://github.com/php-cuong/customer-login/blob/main/Screenshot/muiltiple-rows.gif)

See the video How to lock a customer account in magento 2 here.
===============================================================

[](#see-the-video-how-to-lock-a-customer-account-in-magento-2-here)

[https://www.youtube.com/watch?v=tBGagDLXUAQ&amp;list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ](https://www.youtube.com/watch?v=tBGagDLXUAQ&list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ)

How to add a new dynamic row system configuration in the Magento 2 admin.
=========================================================================

[](#how-to-add-a-new-dynamic-row-system-configuration-in-the-magento-2-admin)

[https://www.youtube.com/watch?v=GZ-I9SdGLT0&amp;list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ](https://www.youtube.com/watch?v=GZ-I9SdGLT0&list=PL98CDCbI3TNvPczWSOnpaMoyxVISLVzYQ)

After instalation execute the query to change the source model to your attribute
================================================================================

[](#after-instalation-execute-the-query-to-change-the-source-model-to-your-attribute)

`UPDATE `eav_attribute` SET `source_model` = 'PHPCuong\\CustomerLogin\\Model\\Customer\\Attribute\\Source\\Reason' WHERE `eav_attribute`.`attribute_code` = 'reason';`This is to not impact when you generate an image that is direct connect to your production BD, so after deploy you need to change the source\_model for attribute reason

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance58

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 70% 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 ~11 days

Total

3

Last Release

273d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5356619?v=4)[Warley Elias](/maintainers/warleyelias)[@warleyelias](https://github.com/warleyelias)

---

Top Contributors

[![php-cuong](https://avatars.githubusercontent.com/u/13449271?v=4)](https://github.com/php-cuong "php-cuong (7 commits)")[![warleyelias](https://avatars.githubusercontent.com/u/5356619?v=4)](https://github.com/warleyelias "warleyelias (3 commits)")

### Embed Badge

![Health badge](/badges/warleyelias-customer-login/health.svg)

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

PHPackages © 2026

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