From 4eeae876c7fb0b13ea0f6d7e336e757c82ebc47e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 30 Nov 2015 16:36:57 +0800 Subject: [PATCH] Pman.php --- Pman.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Pman.php b/Pman.php index f7c77781..f106b577 100644 --- a/Pman.php +++ b/Pman.php @@ -35,12 +35,18 @@ class Pman_Core_Pman { // not got members.. // if we only have one member - then add it .... (it's the admin, and they can modify this later.. - after they get annoyed with it.. - + if ($p->count() == 1) { + $p->find(true); + $member = DB_DataObject::factory('group_members'); + $member->group_id = $group->id; + $member->person_id = $p->id; + $member->insert(); + return; + } // only display if we have members.. - if($p->count() && !$member->count()){ - die("group core-person-signup-bcc does not have any members : add ?_core_skip_check=1 to bypass this check"); - } + die("group core-person-signup-bcc does not have any members : add ?_core_skip_check=1 to bypass this check"); + } -- 2.39.2