shinigaimi's avatar

Share Wordpress login with Laravel

Hey all, I am trying to share login credentials between WordPress and laravel, I found a project called corcel but I didn't see if it shared logins.

I am creating an eCommerce site that has a shopping cart etc

0 likes
3 replies
topvillas's avatar

It shows you how to use authentication in the docs. It took me five seconds of scrolling to find it.

shinigaimi's avatar

I have followed the doc to share the login and It gave me the following error

QueryException in Connection.php line 647:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_email' in 'where clause' (SQL: select * from users where user_email = [email protected] order by user_registered desc limit 1)

the Laravel DB is the same as the WP Database
shinigaimi's avatar

nevermind, I forgot to add this

'wordpress' => [ // this is your Corcel database connection, where WordPress tables are
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'database'  => 'corcel',
        'username'  => 'admin',
        'password'  => 'secret',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => 'wp_',
        'strict'    => false,
        'engine'    => null,
    ],

that resolved my error

Please or to participate in this conversation.