protected function _getRoleIds()
    {
        $ids = [];
        if (!$this->has('roles')) {
            return $ids;
        }
        foreach ($this->roles as $k => $role) {
            $ids[] = $role->id;
        }

        return $ids;
    }
protected function _getRoleIds()
    {
        $ids = [];
        if (!$this->has('roles')) {
            return $ids;
        }
        foreach ($this->roles as $k => $role) {
            $ids[] = $role->id;
        }

        return $ids;
    }
protected function _getRoleIds ( ) { $ ids = [ ] ; if ( ! $ this -> has ( 'roles' ) ) { return $ ids ; } foreach ( $ this -> roles as $ k => $ role ) { $ ids [ ] = $ role -> id ; } return $ ids ; }
Gets an array list of role IDs this user belongs to.

@return array
Gets an array list of role IDs this user belongs to .