Ok, On the "login" page, create session and store username and password infromation in it. And then on every code-global of the page / style, call mgd_auth_midgard and mgd_get_midgard with username and password stored in session. Third parameter of mgd_auth_midgard doesn't work very well.
Then write following check into your page if ($midgard->user) and if you want to use more than one different group, use mgd_is_member. This is the way I'm using it, and it works very well, and it's also quote secure way to do it. >>Authenticated pages must have auth property set on. >>It may sense to >>redesign your application so that it has two trees >>actually: one >>non-authenticated and second with authentication >>enabled. So users will >>come to the first one and browse pages as is but if >>page code sees >>appropriate cookies it does redirect to >>authenticated tree (for example, >>foo.mysite.com/dir1/ redirects to >>foo/mysite/auth/dir1 where page /auth/ is >>active (mirrors /dir1/ by loading and executing >>original /dir1/ code) and auth-enabled). >> > >I kind of played with the idea already to have a >separate authentication-requiring host for that, i.e. >admin.mysite.com next to the freely accessible >www.mysite.com. Both share the same root page, where >the authenticated property is set to "inherited", so >the root page when called at admin.mysite.com/ >requires authentication, when accessed via >www.mysite.com/ it doesn't. >However, in order to test this idea I made the >authentication required for an arbitrary page in my >site, and that didn't work: even after having logged >in at this separate login page, and after having >checked the MidgardLogin cookie was set, I still got >the authentication popup. >Am I overseeing something? > >pascal > >__________________________________________________ >Do You Yahoo!? >Yahoo! Games - play chess, backgammon, pool and more >http://games.yahoo.com/ > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > -- Henri Hovi [EMAIL PROTECTED] Consultant Partner Tel: +358-20-198 6036 Nemein Solutions Oy http://www.nemein.com Nadmin Studio and Midgard support at 0600-1-2552 available for Finnish customers. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
