Adldap\Models\User::getPrimaryGroup PHP Method

getPrimaryGroup() public method

Retrieves the primary group of the current user.
public getPrimaryGroup ( ) : Model | boolean
return Model | boolean
    public function getPrimaryGroup()
    {
        $groupSid = preg_replace('/\\d+$/', $this->getPrimaryGroupId(), $this->getSid());
        return $this->query->newInstance()->findBySid($groupSid);
    }