| | |
| | | return; |
| | | } |
| | | $this->setInviteConfig(); |
| | | $this->cache = Cache::for('invitations'); |
| | | $this->cache = Cache::for('invitations')->user(); |
| | | add_action('init', [$this, 'registerInvitationExecutors'], 5); |
| | | |
| | | add_action('user_register', [$this, 'checkInvitation']); |
| | |
| | | |
| | | public function defineTable():void |
| | | { |
| | | $terms = Registrar::getFeatured('invitable', 'term'); |
| | | $terms = Registrar::withFeature('invitable', 'term'); |
| | | $membership = Site::membership(); |
| | | $roles = ($membership) ? Site::membership()->has('can_invite') :[]; |
| | | if (empty($terms) && empty($roles)) { |
| | |
| | | } |
| | | |
| | | // Term invitations from invitable content taxonomies |
| | | $invitable = Registrar::getFeatured('invitable', 'term'); |
| | | $content = Registrar::getFeatured('is_content', 'term'); |
| | | $ownable = Registrar::getFeatured('is_ownable', 'term'); |
| | | $invitable = Registrar::withFeature('invitable', 'term'); |
| | | $content = Registrar::withFeature('is_content', 'term'); |
| | | $ownable = Registrar::withFeature('is_ownable', 'term'); |
| | | $taxonomies = array_intersect($invitable, $content, $ownable); |
| | | if (!empty($taxonomies)) { |
| | | $users = Registrar::getRegistered('user'); |