News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to determine if the logged in user is an administrator

Started by nVee, October 03, 2012, 08:05:46 AM

Previous topic - Next topic

nVee

My client wants me to do a simple modification to the Post.template.php where if they (administrator) create a new post they want an option where if they tick a checkbox it will send the entire mailinglist an email to notify them of the new topic. I am not sure if there is already a feature like this (if there is, please share with me). I have already modified the template to show the checkbox, the only problem is I cannot determine the usertype. I did a print_r($_SESSION); but it does not contain any user level information or anything I can work with.

Is there another way to determine if the user is an administrator?

Shambles



Shambles

Or you could simply use the built in "announce" feature :D

nVee

Well that sounds like a awesome way :) I had a quick look through but cannot find where it is. How does it work?

Shambles

While creating a topic, open the "attachments and other options" doodaa below the post, and tick the "Announce topic" option.

You'll soon see what it does  8)

Advertisement: