Drupal Association members fund grants that make connections all over the world.
I recently upgraded to flag 2 beta 3 because of the anonymous user support. I integrated session API and I'm trying to allow users, both anonymous and authenticated, to flag themselves with either one of two flags to determine site language. (There ain't no f'in way my clients are ever going to translate string by string with standard locale interface - but if I can set a global 'flag' on one of two languages, I can configure views with some rules magic to only show certain CCK fields of nodes, one in language A or in language B depending on what is flagged).
I'm trying to manually place the link, so I guess this is a two part problem.
#1. Here is my code to manually place the link. I JUST integration session API so I'm still unsure how it handles the $user object but with that said I some hash'd value that generally gives it some temporary ID within GLOBALS['user'].
global $user; $uid = $user->uid; print flag_create_link('global_flag', $uid);
If this is wrong, or won't for anon users, should consider that as if it ties into problem 2.
#2. This code generates a link for anon users. When I click it, I get this message:
You are not authorized to access this page.
Why do you suppose I'd get this error? With the use case above, what do you suppose would be the best way to go forward?