[development] Tell if current page is viewable by anonymous users

Jerad Bitner sirkitree at gmail.com
Tue Feb 19 18:41:51 UTC 2008


Does the module itself provide the page?

On Feb 19, 2008 1:40 PM, Jerad Bitner <sirkitree at gmail.com> wrote:
> function myfunctionname() {
>   global $user;
>   if ($user->uid == 0) {
>     // user in anon
>
>   }
> }
>
> On Feb 19, 2008 1:08 PM, Salgar <salgar at gmx.net> wrote:
> > Petr Vacha wrote:
> > > You can use function menu_valid_path()
> >
> > This checks whether the current user can access the current page - not
> > whether anonymous users may access it. :'(
> >
> > Kind regards,
> >
> > Salgar
> >
>


More information about the development mailing list