[wpmu-trac] [WordPress MU Trac] #638: function get_blogs_of_user
WordPress MU Trac
wpmu-trac at lists.automattic.com
Thu May 22 20:45:06 GMT 2008
#638: function get_blogs_of_user
------------------------+---------------------------------------------------
Reporter: luigisa | Owner: somebody
Type: defect | Status: new
Priority: highest | Milestone:
Component: component1 | Version:
Severity: major | Keywords:
------------------------+---------------------------------------------------
This is for can to used any table_prefix
the older codec only supported wp_ prefix, very big bug I think it!
Sorry for my bad english, I am spanish man.
******************************
function get_blogs_of_user( $id, $all = false ) {
global $wpdb;
$user = get_userdata( $id );
if ( !$user )
return false;
$blogs = $match = array();
foreach ( (array) $user as $key => $value ) {
- if ( strstr( $key, '_capabilities') && strstr( $key,
'wp_') ) {
*********************************************
function get_blogs_of_user( $id, $all = false ) {
global $wpdb;
$user = get_userdata( $id );
if ( !$user )
return false;
$blogs = $match = array();
foreach ( (array) $user as $key => $value ) {
+ if ( strstr( $key, '_capabilities') && strstr( $key,
$wpdb->base_prefix) ) {
******************************************
--
Ticket URL: <http://trac.mu.wordpress.org/ticket/638>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser
More information about the wpmu-trac
mailing list