Hi
I made (a very stupid) mistake, ok I was tired, but still...

instead of putting the usual snippet in the visibility settings of my navigation block :

  global $user;
  return $user->uid == 1;

I put :

  global $user;
  return $user->uid = 0;

so now I get logged out of course automatically... Does anyone know a workaround ?

It's on a local production site under xampplite, so I could just erase my entire install, but first that would be painful, then, I could learn quite a few things by knowing and understanding a fix for this.

Thank you
Paul

Comments

tstoeckler’s picture

What do you mean, you get logged out immediately? What should happen, is that the Navigation block should disappear as soon as you log in. But you should still be logged in.
Therefore you should be able to visit /admin/build/block and set the block visibility for your Navigation block.

poloparis’s picture

apparently what I think happens is that by using '=' instead of the double '==', in $user->uid = 0, it sets uid to anonymous each time the navigation block appears, which it does when i log in as admin.

So I log in, Drupal displays the page, then I get logged out as the navigation block displays and interprets the code $user->uid=0

gbrussel’s picture

You'll want to dive into your phpmyadmin and look in the table "boxes" for the block you created and change the code that way.

poloparis’s picture

Thank you guys so much

it was actually in the 'blocks' table that I found the invalid code i had entered. I just deleted it, and now I can log in again.

And there again, I learnt something more than just erazing my entire install.
Thanks gbrussel, tstoeckler and the Drupal community
Paul