21function b_legacy_usermenu_show()
23 $root =& XCube_Root::getSingleton();
24 $xoopsUser =& $root->mController->mRoot->mContext->mXoopsUser;
26 if (is_object($xoopsUser)) {
29 $block[
'uid'] = $xoopsUser->get(
'uid');
30 $block[
'flagShowInbox'] =
false;
36 $service =& $root->mServiceManager->getService(
'privateMessage');
37 if (
null != $service) {
38 $client =& $root->mServiceManager->createClient($service);
39 $url = $client->call(
'getPmInboxUrl', [
'uid' => $xoopsUser->get(
'uid')]);
42 $block[
'inbox_url'] = $url;
43 $block[
'new_messages'] = $client->call(
'getCountUnreadPM', [
'uid' => $xoopsUser->get(
'uid')]);
44 $block[
'flagShowInbox']=
true;
48 $block[
'show_adminlink'] = $root->mContext->mUser->isInRole(
'Site.Administrator');