Move login status calculation to its own method and add API in member module

This commit is contained in:
Kijin Sung 2022-08-05 10:21:14 +09:00
parent a0f895a02f
commit 0cc1246898
3 changed files with 33 additions and 12 deletions

View file

@ -32,6 +32,7 @@
<action name="dispMemberLogout" type="view" meta-noindex="true" />
<action name="dispMemberSpammer" type="view" permission="manager" check_var="module_srl" meta-noindex="true" />
<action name="getLoginStatus" type="model" meta-noindex="true" />
<action name="getMemberMenu" type="model" />
<action name="getApiGroups" type="model" permission="root" />

View file

@ -174,6 +174,15 @@ class memberModel extends member
return null;
}
/**
* Display login status as JSON API
*/
public function getLoginStatus()
{
Context::setResponseMethod('JSON');
$this->add('status', Rhymix\Framework\Session::getLoginStatus());
}
/**
* @brief Display menus of the member
*/