How to get current logged in user in Wordpress Multisite outside of it?
I tried the method for Wordpress Singlesite and it give the error
Call to a member function set_prefix() on a non-object on code line
$wpdb->set_prefix( $table_prefix, false ); location
I think there should be a way to do it properly without exporting a bunch of functions from Wordpress.
Piece of code (
$root = ABSPATH . '/sf/app'):
$root = $this->container->getParameter('kernel.root_dir'); require_once(realpath($root . '/../../wp-load.php'));