定制 custom-d/cd-laravel-user 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

custom-d/cd-laravel-user

最新稳定版本:v1.0.0

Composer 安装命令:

composer require custom-d/cd-laravel-user

包简介

Api based User management

README 文档

README

Api based User management

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require custom-d/cd-laravel-user

You can publish and run the migrations with:

php artisan vendor:publish --tag="cd-laravel-user-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="cd-laravel-user-config"

This is the contents of the published config file:

return [
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="cd-laravel-user-views"

Usage

$cdLaravelUser = new CustomD\CdLaravelUser();
echo $cdLaravelUser->echoPhrase('Hello, CustomD!');

Impersonation:

1) add the followig method With your own inner logic to the User Model: (both default to true if not setup)

 public function canBeImpersonated(): bool
    {
        return ! $this->hasAnyRole('Developer');
    }

 public function canImpersonate(): bool
    {
        return  $this->hasAnyRole('Developer');
    }

If you have encryption enabled: in your key provider methods to get PrivateKeyForRecord: $user = app(ImpersonateManager::class)->getImpersonator() ?? auth()->user(); // @phpstan-ignore-line to get the user for the keystore.

## Password reset Env: CD_LARAVEL_USER_PASSWORD_RESET_ALWAYS_PASS default false, if set to true, password resets requests will always return a success even if the user does not exist.

you can also override the validation rules in teh config file: ie: add email address exists and is validated etc.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see [CONTRIBUTING](https://github.com/Custom D/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-28