On Thu, Feb 15, 2001 at 12:13:43PM +0100, Emiliano mentioned:
> "John P . Looney" wrote:
> ...
> > $midgard = mgd_get_midgard();
> > $user_id=$midgard->user;
> What does $midgard->admin say at this point (assuming you logged in as
> admin, of course)?
It's 0. Just did;
$midgard = mgd_get_midgard();
$user_id=$midgard->user;
$admin_id=$midgard->admin;
And, at the bottom:
if($midgard->admin) {
echo "<A HREF=\"/asgard/page/edit/$midgard->page\">Edit this
page</A>";
} else {
$person = mgd_get_person( $user_id );
echo "$person->firstname ($user_id), you are not recognised as an admin
($admin_id) for this page";
}
And it's printing:
John (2), you are not recognised as an admin (0) for this page
Kate
--
When I say 'free', I mean 'free': free from bond, of chain or command:
to go where you will, even to Mordor, Saruman, if you desire. "
-- Gandalf, paraphrasing the choice between Free and Non-free software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]