From 4a95a0bb6073bf9db71bd049b3e96fd860671be1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 7 Feb 2012 16:26:51 +0100 Subject: [PATCH] scripts to join and leave groups --- scripts/joingroup.php | 58 ++++++++++++++++++++++++++++++++++++++++++ scripts/leavegroup.php | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 scripts/joingroup.php create mode 100644 scripts/leavegroup.php diff --git a/scripts/joingroup.php b/scripts/joingroup.php new file mode 100644 index 0000000000..658244db9d --- /dev/null +++ b/scripts/joingroup.php @@ -0,0 +1,58 @@ +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); + +$shortoptions = 'i:n:g:G:'; +$longoptions = array('id=', 'nickname=', 'group=', 'group-id='); + +$helptext = <<group_id); + $user->joinGroup($group); + print "OK\n"; +} catch (Exception $e) { + print $e->getMessage()."\n"; + exit(1); +} diff --git a/scripts/leavegroup.php b/scripts/leavegroup.php new file mode 100644 index 0000000000..653c3b5aad --- /dev/null +++ b/scripts/leavegroup.php @@ -0,0 +1,58 @@ +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); + +$shortoptions = 'i:n:g:G:'; +$longoptions = array('id=', 'nickname=', 'group=', 'group-id='); + +$helptext = <<group_id); + $user->leaveGroup($group); + print "OK\n"; +} catch (Exception $e) { + print $e->getMessage()."\n"; + exit(1); +} -- 2.39.5