/** * 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); }
/** * {@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; }