added functions to get all developer roles for the application, and the current user's developer role for an application.
Roles include (administrators, developers, testers, insight users).
Common use is saving the role to the user model in beforeFacebookSave:
function beforeFacebookSave(){
$this->Connect->authUser['User']['email'] = $this->Connect->user('email');
$this->Connect->authUser['User']['username'] = $this->Connect->user('name');
$this->Connect->authUser['User']['role'] = $this->Connect->role();
return true;
}
And restricting certain areas of the site to certain roles:
if ($user['role'] == 'administrators') {
echo "admins only section";
}
Modified Connect Component:
added functions to get all developer roles for the application, and the current user's developer role for an application. Roles include (administrators, developers, testers, insight users).
Common use is saving the role to the user model in beforeFacebookSave: function beforeFacebookSave(){ $this->Connect->authUser['User']['email'] = $this->Connect->user('email'); $this->Connect->authUser['User']['username'] = $this->Connect->user('name'); $this->Connect->authUser['User']['role'] = $this->Connect->role(); return true; }
And restricting certain areas of the site to certain roles:
if ($user['role'] == 'administrators') { echo "admins only section"; }