DataObjects/Core_notify_recur.php
[Pman.Core] / Pman.php
index 3ac00fa..c887f7c 100644 (file)
--- a/Pman.php
+++ b/Pman.php
@@ -1,8 +1,38 @@
 <?php
 
-/* 
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
+/*
+ * this is loaded by the pman admin..
+ *
+ * it checks that required variables are set...
+ *
  */
-
+class Pman_Core_Pman {
+    
+    
+    function init ($pg)
+    {
+        if(!empty($_REQUEST['_core_skip_check'])){
+            return;
+        }
+        
+        $group = DB_DataObject::factory('groups');
+        
+        // group should be auto created - by update-database...
+        
+        if(!$group->get('name', 'core-person-signup-bcc')){
+            die("group core-person-signup-bcc does not exist : add ?_core_skip_check=1 to bypass this check");
+        }
+        
+        $member = DB_DataObject::factory('group_members');
+        $member->group_id = $group->id;
+        
+        if(!$member->count()){
+            die("group core-person-signup-bcc does not have any members : add ?_core_skip_check=1 to bypass this check");
+        }
+        
+        
+    }
+    
+    
+    
+}
\ No newline at end of file