Example #1
0
 /**
  * Get user role
  *
  * @param int    $uid
  * @param string $section   Section name: admin, front
  *
  * @return string|array
  */
 public function getRole($uid, $section = '')
 {
     return parent::getRole($uid, $section);
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function getRole($uid, $section = '')
 {
     $section = $section ?: Pi::engine()->application()->getSection();
     $roles = parent::getRole($uid, $section);
     if ($uid && 'front' == $section) {
         if (!in_array('member', $roles)) {
             $roles[] = 'member';
         }
     }
     return $roles;
 }