Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: BlackRookSix - tammikuu 21, 2006, 01:29:28 IP

Otsikko: Login, Group membership check
Kirjoitti: BlackRookSix - tammikuu 21, 2006, 01:29:28 IP
I am attempting to use smf_api.php to build an include page that does:

  -  Login the user using their cookie, just as the board does.  If not, it forces them to the login page.

  -  Check that the user is a member of group X on the boards.  I only need to check one group, since it is configured as a supergroup.


Any pointers would be appreciated, as the documentation, forums and actual php files are a mountain to read through just to find these two (seemingly) small needs.
Otsikko: Re: Login, Group membership check
Kirjoitti: Dannii - tammikuu 21, 2006, 11:02:50 IP
Are you sure you need to use smf_api.php instead of SSI.php? I'm not familiary with smf_api.php, but I know SSI.php can do these simply and a whole lot more, and allows you to easily use the user_info array.