Got directed here from the follow.module issue queue

See the issue there for more info: http://drupal.org/node/1163654

Not quite sure if it's an issue with Follow or an issue with Me Aliases.

thanks

CommentFileSizeAuthor
#1 follow-1168158-1.patch2.54 KBnohup

Comments

nohup’s picture

StatusFileSize
new2.54 KB

Follow uses

$items['user/%/follow'] = array(
...
  );

as a menu item. Instead if that code is changed to

$items['user/%user/follow'] = array(
...
  );

it fixes the issue. Use of %user will make 'me' module recognize it as a candidate menu for change and will make drupal pass a user object instead of the uid to the follow_links_form function. This change does not break anything, even if the me module is disabled. The attached patch does these changes to the follow module.

rv0’s picture

Status: Active » Fixed

Thanks for the patch.

As far as I can see, there's one thing you forgot, in the user_access function, the object is now passed instead of the uid, so every call to $uid should become $uid->uid
I'm rerolling the patch next and I will post it in the Follow.module's issue I made before.
Setting this to fixed.

For reference, here's the code:

function follow_links_user_access($uid) {
  return ((($GLOBALS['user']->uid == $uid->uid) && user_access('edit own follow links')) || user_access('edit any user follow links')) && $uid->uid > 0;
}

Thanks again.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.