Freddy and Sayaka... If this block code works OK maybe we should post it in the Block Code Snippets Index boards?
It works okay for it needs to do, I have it running under both local and live environment. I made adaptations to SimpleDesk's SSI for SMF 2.1 here on GitHub so hopefully its pulled into their repository, I added functionality to be able to call departments since this block unfortunately doesn't honor department settings (since the SSI for SD does not even factor it).
I'm not sure if I have the permission to post there as a Newbie member. I'm restricted quite a lot right now, I think the restrictions will be lifted once I meet a certain number of posts but there hasn't been any sign of them lifting (as of yet). Maybe it's 10 posts like on SM.org