logged_in user outside of wordpress loop

this worked with root cookie: <?php define(‘WP_USE_THEMES’, false); if (file_exists(‘../books/wp-blog-header.php’)) { require_once(‘../books/wp-blog-header.php’); } else { echo ‘ERROR: blog header does not exist’; } global $current_user; get_currentuserinfo(); # Either load WordPress : http://codex.wordpress.org/Integrating_WordPress_with_Your_Website # or Manually define your url like… $cookieurl = “mybooksite.com”; define( ‘COOKIEHASH’, md5( $cookieurl ) ); $cookiename = “wordpress_logged_in_” . COOKIEHASH; $sitetitle=”Book Viewer”; … Read more

User count only for role frontend vendor

to get the number of authors who are assigned a particular role the get_users() function should do it: $args = array( ‘role’ => ‘frontend_vendor’,//substitute your role here as needed ‘fields’ => ‘ID’, ); $users = get_users( $args ); $user_count = count( $users );

WordPress MU users – how are they organized?

The conceptual difference between users in a standalone site and a network site is that in a network the users do not belong to the site but to the network itself are are being automatically logged in into all the network site once they login to one. Most of the time the difference can be … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)