The MU forums have moved to WordPress.org

Password retrieval: $current_site vs blog_url (10 posts)

  1. basszje
    Member
    Posted 14 years ago #

    $message .= 'http://' . trailingslashit( $current_site->domain . $current_site->path ) . "\r\n\r\n";

    In the password mail script the var used for site is $current_site. Is there any reason to pick this one instead of the blog url in the wp_blogs table?

    In my situation this breaks the scripting since I have no 'main blog page' but only subdomains.

  2. MrBrian
    Member
    Posted 14 years ago #

    "In my situation this breaks the scripting since I have no 'main blog page' but only subdomains. "

    I don't understand that or what exactly your problem is. Also, there is no wp_blogs table (maybe you meant wp_site).

  3. basszje
    Member
    Posted 14 years ago #

    The problem is that the code takes the URL from the wp_site indeed instead of looking the subdomain blog up in wp_blogs ( that table surely exist within mu and contains all the subdomain urls! ) .

    Now the problem is as following :

    subdomain.domain.nl
    subdomain.domain.nl
    (etc)

    are requesting their lost passwords. The script sends a mail containing a link to http://www.domain.nl / passwordfinder.

    I was wondering why in this case the 'central' domain URL ( which is my case is used for another site ) is returned while in many other case the blog URL is used ( for logging in for instance ).

    Hope this makes it a little bit more clear :)

  4. MrBrian
    Member
    Posted 14 years ago #

    It should work the same with the subdomain or without. What's the problem?

  5. basszje
    Member
    Posted 14 years ago #

    hehe this is almost like the tower of babel :P. In the email send by the password mailer ( the code snippet over there ) it doesn't. I send a link to the main site - regardless

    I was wondering if that was expected behavior or not :)

    EDIT: it's even intended, see : http://trac.mu.wordpress.org/changeset/1312 .

    This is a problem when you don't have a mainblog. Why can't subdomains handle it directly on the user table - now you are able to reset anybody from any subdomain. Doesn't this need checking?

  6. andrea_r
    Moderator
    Posted 14 years ago #

    Why don't you have a main blog?

  7. basszje
    Member
    Posted 14 years ago #

    Because my www has better things to do. It's not needed for anything else and reading the changes above it's strange why it's needed for this?

  8. andrea_r
    Moderator
    Posted 14 years ago #

    For central user & blog management. It doesn't matter if you have a landing page going somewhere else, whatever. You still need to get to yourdomain.com./wp-admin.

  9. basszje
    Member
    Posted 14 years ago #

    For what? I use a 'test' subdomain when I need to create blogs and manage the users. It's only small parts of the code who need a central blog ( this for instance ), but it would be really nice if subdomains could do it. I see no technical reason ( especially not for password retrieval ).

    I seems like some dev-decision of which I cannot put my head around :) Why not go for the highest flexibility?

  10. kipit
    Member
    Posted 13 years ago #

    Hi,

    Agree with basszje, the password retrieval can (should) point be on the blog from where the demand was done. I'm on the same case, the "domain blog" does not deal with WPmu.

About this Topic