Download the PHP package aiyuchen/wordpress-auth-provider without Composer
On this page you can find all versions of the php package aiyuchen/wordpress-auth-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aiyuchen/wordpress-auth-provider
More information about aiyuchen/wordpress-auth-provider
Files in aiyuchen/wordpress-auth-provider
Package wordpress-auth-provider
Short Description A package to provide wordpress users in laravel authentication system.
License MIT
Informations about the package wordpress-auth-provider
Wordpress Auth Driver for Laravel
Laravel | wordpress-auth-driver-laravel |
---|---|
5.2 to 5.5 | ^1.0 |
5.6 to 5.8 | ^2.0 |
^6.0 | * |
Installation
To install this package you will need Laravel 5.*
- Laravel ^5.6|^6.0|^7.0|^8.0|^9.0 (for older versions of laravel)
- PHP 7.1
Laravel 6.*
- Laravel 6.1
- PHP >= 7.2
The best way to install this package is with the help of composer. Run
or install it by adding it to composer.json
then run composer update
Setup
Once you have installed this package from the composer, make sure to follow the below steps to configure.
To register authentication guard.
config/auth.php
Publish config file (optional)
It will publish config file (config/wordpress-auth.php
) where you can define your own connection type e.g wp-mysql
. Make sure to fill prefix
in config/database.php
for wp_
prefix in your tables if you're using prefix in wordpress tabels.
For example:
Configuration
password_resets
table (from Laravel default auth mechanism) is required to hold reset password token. If you do not have password_resets
table then use this migration instead
Extension
Alternatively, if you want to use a custom user model, you should have it extend MrShan0\WordpressAuth\Models\WordpressUser
and specify the name of your model in config/auth.php
under providers
-> wordpress
-> model
.
Customization
If you've renamed your user_email
column of wordpress database, you need to first publish configurations of this package if you've not already, extend the model as mentioned above and make sure you've override your changes in your $fillable
property and config/wordpress-auth.php
config file which is being used for authentication scaffolding and sending notifications.
Usage
You need to define wordpress
guard explicitly to load the driver.
Examples
You may also change default guard in config/auth.php
then your code will look like
If you haven't set default guard and wanted to take advantage of Password Resets (Auth Scaffolding) in laravel. You may need to define guard
and broker
explicitly in Auth/ForgotPasswordController.php
and Auth/ResetPasswordController.php
as
Changelog
CHANGELOG
Credits
Thanks to the community of Laravel.
Copyright and License
Copyright (c) 2016 Ahsaan Muhammad Yousuf, MIT License
All versions of wordpress-auth-provider with dependencies
hautelook/phpass Version >=0.3
laravel/framework Version ^5.6|^6.0|^7.0|^8.0|^9.0