Project:Drupal core
Version:x.y.z
Component:bloggerapi.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Since I installed the CVS version, all the posts posted via the blogger API (using Bloggar under Windows) get posted as Anonymous.

I didn't find where it can come from by checking the CVS changes.
any idea?

Comments

#1

I tracked the problem in the last cvs version I got.

so I modified bloggerapi.module in the function >bloggerapi_driver.

I added the field "name" in the array returned when doing a newPost:

switch ($method) {
case "newPost":
debugthat("define array for newPost, UId is ".$user->uid);
return array("type" => "blog", "name" => $user->name, "title" => $title, "body" => $cparams[4], "status" => 1, "moderate" => 0, "comment" => 2, "promote" => 0, "revision" => 0);
break;

this field is read by node.module in the function node_validate to determine the userid. if the field is not present, the userid is 0 = anonymous !!!

there we are !

I let an official drupal developper fixed that in the cvs tree... thanks

Note: by the way I corrected another bug in the bloggerapi.
the url of the blog determined by the function bloggerapi_user_blogs() was wrong it was doing
url("blog/view". urlencode($user->uid))
instead of
url("blog/". urlencode($user->uid))

#2

#3