radiate-framework / framework

A WordPress plugin and theme framework
https://radiate-framework.github.io/
MIT License
4 stars 0 forks source link

Pass existing WP_User to Auth::login() #8

Closed BenRutlandWeb closed 3 years ago

BenRutlandWeb commented 3 years ago

Is your feature request related to a problem? Please describe. Auth login only accepts credentials

Describe the solution you'd like The ability to login a user by the WP_User instance

Describe alternatives you've considered extracting the credentials from the user but the password is already hashed so not possible

Additional context


<?php

use Radiate\Support\Facades\Auth;
use WP_User as User;

Auth::login(new User(1));
BenRutlandWeb commented 3 years ago

https://wordpress.stackexchange.com/questions/53503/can-i-programmatically-login-a-user-without-a-password#answer-128445

A way to achieve login without the password