public function getUserFlags() : array
    {
        if ($this->flags !== null) {
            return $this->flags;
        }

        $this->flags = [];
        $usergroups = $this->usergroups;

        foreach ($usergroups as $usergroup) {
            $group = $usergroup->group;
            $flags = $group->flags;

            if (!empty($flags)) {
                $this->flags = array_merge($this->flags, $flags);
            }
        }

        return $this->flags;
    }
public function getUserFlags() : array
    {
        if ($this->flags !== null) {
            return $this->flags;
        }

        $this->flags = [];
        $usergroups = $this->usergroups;

        foreach ($usergroups as $usergroup) {
            $group = $usergroup->group;
            $flags = $group->flags;

            if (!empty($flags)) {
                $this->flags = array_merge($this->flags, $flags);
            }
        }

        return $this->flags;
    }
public function getUserFlags ( ) : array { if ( $ this -> flags !== null ) { return $ this -> flags ; } $ this -> flags = [ ] ; $ usergroups = $ this -> usergroups ; foreach ( $ usergroups as $ usergroup ) { $ group = $ usergroup -> group ; $ flags = $ group -> flags ; if ( ! empty ( $ flags ) ) { $ this -> flags = array_merge ( $ this -> flags , $ flags ) ; } } return $ this -> flags ; }
Get all user flags.

@return array
Get all user flags .