Temporary user, automatic log-in, non-restricted post-editing (5 posts)

  1. Zambrano Sergio
    Posted 5 years ago #

    I'd like to let visitors to modify a post and preview it WITHOUT logging-in. (I'm using "Revisionary" plugin for keeping edits on hold until approved)

    I can let anyone register, but I'd like to skip those steps.

    Any suggestion for any of the following alternatives?:

    • automatically logging-in user with any of some existent non-logged-in author credentials.
    • Bypassing log-in window, automatically logging-in as a specific user (passing user and pass on the link?)
    • Temporary user automatically generated (with or without expire)
    • "Edit post" reach-able by anyone, with an "email" field to register him in background while he's already editing.


  2. MichaelH
    Posted 5 years ago #

    As a beginning you might look at http://wordpress.org/extend/plugins/front-end-editor/

    Have never used this but another one:

  3. Zambrano Sergio
    Posted 5 years ago #

    I don't need a different way to edit the post, which actually needs the same privileges and registration than the regular way.

    I need a way to BYPASS the login, either by adding a user/pass to the url of a link, creating a temporary user, or just NOT wait for the registration email confirmation to allow a user to edit my posts.

    I found "quick subscribe" which claims to create a username from an email, but it doesn't - at least in my wp version.

    Also, I liked "no-login", but it ignores the whole security system instead of selectively assigning a specific role to unsigned users. It makes ALL of them admins.

  4. Zambrano Sergio
    Posted 5 years ago #


    Ive implemented a piece of code intended for a MU installation, that did the trick. The only problem I haven't gotten the any ABSPATH similar script to get automatically the location of the wp-blog-header.php file, but hardcoding the path works so far.

    $user_login = 'visitor';
    $user = get_userdatabylogin($user_login);
    $user_id = $user->ID;
    wp_set_current_user($user_id, $user_login);
    do_action('wp_login', $user_login);

    You need to have a 'visitor' user defined, or matching yours in this script.

    I'd rather create a new user automatically based on their email, so they can see their avatar in the page, and I wouldn't have to look for a way to lock the visitor profile to prevent to be changed… but that's for another thread.

  5. Philip
    Posted 5 years ago #

    Just wanted to say, Thanks for this little snippet. I've been working on a custom Facebook Connect App for my site. The problem was how to log the user in to my WPMU/Buddypress site after automatic creation of a local account upon Facebook Connection. The whole point of the thing was so they wouldn't have to remember a separate username/password for my site, so I wanted my WPMU install to detect their presence upon Facebook Connection (based on facebook user ID) and automatically log them into my site (after creating an account for them if one does not already exist), so they could interact via BuddyPress and maintain an extended profile on my site. This was the last piece to my puzzle.

    I'm wondering, however, if this presents any major security threats. I figure since the cookie is only stored locally, and since there is no transmission of password security risks are minimal?

    Thanks again,

Topic Closed

This topic has been closed to new replies.

About this Topic