[development] global $user unavaialable?
David Metzler
metzlerd at metzlerd.com
Fri Mar 20 18:25:46 UTC 2009
Page callback. Tried both NORMAL_MENU_ITEM and CALLBACK.
Dave
On Mar 20, 2009, at 11:22 AM, Stewart Robinson wrote:
> Is this code snippet in the page callback or a hook function?
>
> Hook_boot and some others run before the user has been loaded
>
> On 3/20/09, David Metzler <metzlerd at metzlerd.com> wrote:
>> I'm working on implementing a new cas_server module that allows
>> drupal accounts to be used as a single - sign on source. I have a
>> drupal 5 site issues a redirect to a drupal 6 site, and when I
>> redirect to that page I don't find that the $user global is
>> populated. Is there some function or include that I should b calling
>> to make sure that this data is there?
>>
>> Code snippet that isn't returning correct data.
>>
>> global $user
>> if ($user->uid) {
>> drupal_set_message('user logged in');
>> }
>> else {
>> drupal_set_message('User not logged in');
>> }
>>
>> Note that if I click on any other link in the drupal page. I show as
>> being logged in, but the redirect to this page does not load the
>> $user variable.
>>
>> Developing against drupal 6.10
>>
>>
>
> --
> Sent from my mobile device
More information about the development
mailing list