how to determin a blog owners username?

I am trying to get a plugin author to make his plugin multisite compatible and there is a little problem I am hitting here: I'd like this plugin to use the blog owner's username in the FROM user field for emails sent and his email in the FROM email field.

the email part can be done: http://codex.wordpress.org/Function_Reference/get_bloginfo#Parameters using admin_email but what to do about the username?

here is the whole thread in case you want to read the whole story: http://wordpress.org/support/topic/plugin-subscribe-to-comments-reloaded-multisite-features/page/2?replies=34

  • Ovidiu
    • Code Wrangler

    any of the admins would do :slight_smile:

    I'm talking about teh subscribe to comments reloaded plugin.
    after network activation, the settings point to send emails from:

    username: admin
    email: blog owner's email

    and that would mean, thousands of emails coming from admin :slight_frown:

    I just don't get it why there is get_bloginfo() which can get me the following:

    'admin_email' - Returns the 'E-mail address' set in Settings > General. This data is retrieved from the 'admin_email' record in the wp_options table.

    but not the admin user name???

    I suggested using

    'name' - Returns the 'Site Title' set in Settings > General. This data is retrieved from the 'blogname' record in the wp_options table.
    but then what if a user uses a very long title that include characters not allowed in email names, according to the SMTP protocol?

  • Philip John
    • DEV MAN’s Apprentice

    I see your point. It's a difficult one - blogs are not always just one user.

    Think about WPMU.org for example - whose name would we put on those e-mails?

    Personally, I'd favour the site name but I get the characters thing. Could you not strip those out in a graceful way?

    Phil

  • Ovidiu
    • Code Wrangler

    yeah, but I'm talking about multisite so usually its no very tech-savvy people creating free blogs and I think rarely are there several admins to them...

    anyway, the plugin author said he'll give it a shot using the blog-name...

    I do get your point about multiple admins BUT get_bloginfo(admin_email) delivers a specific email address and only one per blog. why isn't there a feature to also deliver the username connected with this email address?

    Anyway, thanks for pitching in, I just hoped there was a trick to make this happen I wasn't aware of :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.