intellow/reuse-soft-deleted-user-email 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

intellow/reuse-soft-deleted-user-email

Composer 安装命令:

composer require intellow/reuse-soft-deleted-user-email

包简介

When you soft delete a user, this trait allows that email address to be registered again in a different user account

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

When you soft delete a user in Laravel, that email cannot be registered again since the email field on the users table must be unique.

This package solves this problem and allows you to soft delete a user record, retain the original email as history, and still register a new user account with the same email address.

Installation

You can install the package via composer:

composer require intellow/reuse-soft-deleted-user-email

Usage

In a Laravel app with users and SoftDeletes, add the trait to your User model

class User extends Authenticatable
{
    use SoftDeletes;
    use ReuseSoftDeletedEmails;

Now when a user is deleted, their email in the database will change from user@email.com to user@email.com1574789049_deleted where 1574789049 is the timestamp when the user was deleted.

This allows another user to be registered with the email user@email.com while retaining the record of the old deleted user.

The package adds an accessor to the User model, so if you access the trashed user and get their email, you will see user@email.com without the appended timestamp_deleted string.

Expiration Date

Please note this package will cease to work on Sat 20 Nov 2286 05:46:40 PM UTC when the unix timestamp adds an 11th digit.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email kevin@intellow.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

  • 总下载量: 618
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固