Ready to get started?Download WordPress


Any Security Issues?? (2 posts)

  1. holo-alan
    Posted 4 years ago #

    Would adding this to a template page have any security issues?

      global $blog_id , $user_ID;
      $userid = $user_ID;
      $blogid = $blog_id;
      $role = 'subscriber';
      if ( add_user_to_blog( $blogid, $userid, $role ) ) {
        echo 'Added user '.$userid.' as '.$role.' to blog '.$blogid.'.';
      } else {
        echo 'Failed to add user '.$userid.' as '.$role.' to blog '.$blogid.'.';
  2. holo-alan
    Posted 4 years ago #

    Just thought this won't work any way, as it will change all users to subscriber, when they hit the page with it on, not just the unassigned users..

    back to the drawing board I guess..

Topic Closed

This topic has been closed to new replies.

About this Topic