@@ -198,47 +198,47 @@ public function denyGroup($operator = null, $send_mail = true)
198198 }
199199 }
200200
201- /**
202- * This method will delete the group, either by admin action or PI action
203- */
204- public function removeGroup ($ send_mail = true )
205- {
206- // remove any pending requests
207- // this will silently fail if the request doesn't exist (which is what we want)
208- $ this ->SQL ->removeRequests ($ this ->pi_uid );
209-
210- // we don't need to do anything extra if the group is already deleted
211- if (!$ this ->exists ()) {
212- return ;
213- }
214-
215- // first, we must record the users in the group currently
216- $ users = $ this ->getGroupMembers ();
217-
218- // now we delete the ldap entry
219- $ ldapPiGroupEntry = $ this ->getLDAPPiGroup ();
220- if ($ ldapPiGroupEntry ->exists ()) {
221- if (!$ ldapPiGroupEntry ->delete ()) {
222- throw new Exception ("Unable to delete PI ldap group " );
223- }
224-
225- $ this ->REDIS ->removeCacheArray ("sorted_groups " , "" , $ this ->getPIUID ());
226- foreach ($ users as $ user ) {
227- $ this ->REDIS ->removeCacheArray ($ user ->getUID (), "groups " , $ this ->getPIUID ());
228- }
229- }
230-
231- // send email to every user of the now deleted PI group
232- if ($ send_mail ) {
233- foreach ($ users as $ user ) {
234- $ this ->MAILER ->sendMail (
235- $ user ->getMail (),
236- "group_disband " ,
237- array ("group_name " => $ this ->pi_uid )
238- );
239- }
240- }
241- }
201+ // / **
202+ // * This method will delete the group, either by admin action or PI action
203+ // */
204+ // public function removeGroup($send_mail = true)
205+ // {
206+ // // remove any pending requests
207+ // // this will silently fail if the request doesn't exist (which is what we want)
208+ // $this->SQL->removeRequests($this->pi_uid);
209+
210+ // // we don't need to do anything extra if the group is already deleted
211+ // if (!$this->exists()) {
212+ // return;
213+ // }
214+
215+ // // first, we must record the users in the group currently
216+ // $users = $this->getGroupMembers();
217+
218+ // // now we delete the ldap entry
219+ // $ldapPiGroupEntry = $this->getLDAPPiGroup();
220+ // if ($ldapPiGroupEntry->exists()) {
221+ // if (!$ldapPiGroupEntry->delete()) {
222+ // throw new Exception("Unable to delete PI ldap group");
223+ // }
224+
225+ // $this->REDIS->removeCacheArray("sorted_groups", "", $this->getPIUID());
226+ // foreach ($users as $user) {
227+ // $this->REDIS->removeCacheArray($user->getUID(), "groups", $this->getPIUID());
228+ // }
229+ // }
230+
231+ // // send email to every user of the now deleted PI group
232+ // if ($send_mail) {
233+ // foreach ($users as $user) {
234+ // $this->MAILER->sendMail(
235+ // $user->getMail(),
236+ // "group_disband",
237+ // array("group_name" => $this->pi_uid)
238+ // );
239+ // }
240+ // }
241+ // }
242242
243243 /**
244244 * This method is executed when a user is approved to join the group (either by admin or the group owner)
0 commit comments