Download the PHP package rhmdnj/laravel-impersonate without Composer
On this page you can find all versions of the php package rhmdnj/laravel-impersonate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rhmdnj/laravel-impersonate
More information about rhmdnj/laravel-impersonate
Files in rhmdnj/laravel-impersonate
Package laravel-impersonate
Short Description Login as a different user quickly
License MIT
Informations about the package laravel-impersonate
Lara Personate
Is a user impersonate for the Laravel framework. This package makes it easier for users who have access rights such as super admin to take over other user accounts.
Installation
To install the package, simply follow the steps below.
Install the package using Composer:
Sometimes some users experience the problem of layout after upgrading the package, this can be solved by deleting the
public/vendor/octopyid/impersonate
folder then republish the assets.
Add the trait Octopy\LaraPersonate\Models\Impersonate
to your User model.
Usage
By default, the user can impersonate and who is can be impersonated, but this causes security issues.
Defining Authorization
To limit the users who can impersonate. Add canImpersonate()
to the User model.
To limit which users can be impersonated by other users, for example super admin permissions cannot be impersonated by others, add canBeImpersonated()
to the User model.
Disclaimer
This package can pose a serious security issue if used incorrectly, as anybody will be able to take control of any user's account.
By using this package, you agree that Octopy ID and the contributors of this package cannot be held responsible for any damages caused by using this package.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.