Skip to Content.
Sympa Menu

lyceum-users - Re: [Lyceum-users] Determine Blog Owner

lyceum-users AT lists.ibiblio.org

Subject: Lyceum-users mailing list

List archive

Chronological Thread  
  • From: Juan Arias <juanito_budapest AT yahoo.es>
  • To: Vix <garinungkadol AT gmail.com>
  • Cc: lyceum-users AT lists.ibiblio.org
  • Subject: Re: [Lyceum-users] Determine Blog Owner
  • Date: Mon, 05 Feb 2007 10:42:13 +0100

What information. do u have initally ? I mean, if the user is logged in, we can have his/her $user_ID, and then, a nice get_currentuserinfo() may do the trick . . . That fills the global $userdata with current user´s information from the DB, but not user´s blog URL, for what i have found a nifty. query, based on the global $user_ID.

But i think what u need is blog owner´s info off blog´s name, isn´t it ? I don´t remember if i did come across some function doing that, but u can always make a query that returns current blog´s owner $user_ID:

$user_ID_data= $wpdb->get_results("
            SELECT DISTINCT
                $wpdb->users.ID
            FROM $wpdb->blogs
                INNER JOIN $wpdb->usermeta ON ($wpdb->blogs.id = $wpdb->usermeta.blog)
                INNER JOIN $wpdb->users       ON ($wpdb->users.ID = $wpdb->usermeta.user_ID)
            WHERE
                blogs.slug = '$current_blog_slug' // <-- U need to initialize this variable !!
                ")
            ;
  $current_blog_owners_ID = $user_ID_data[0]->ID ;
And that´s it :D

Juanito.

PD : Im pretty sure there has to be a function that does this, but as i am unable to track'em all, i just began to use personal queries for some things like this. jjb has to know  . . .


Vix escribió:
I'm customizing Andrew Ferguson's Add User Photo Plugin
(http://www.andrewferguson.net/wordpress-plugins/add-user-photo/) for
Lyceum and I've run into a snag when trying to display the image.

For example I can get the blog name by using: $_GET['b']...
How do I get something similar for the blog owner's information?


----
Vix
http://garinungkadol.com
_______________________________________________
Lyceum-users mailing list
Lyceum-users AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/lyceum-users

  
______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com



Archive powered by MHonArc 2.6.24.

Top of Page