END_OF_MAKEGROUPADMIN_HELP;
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR.'/scripts/commandline.inc.php';
$nickname = get_option_value('n', 'nickname');
$groupname = get_option_value('g', 'group');
try {
- $user = User::staticGet('nickname', $nickname);
+ $user = User::getKV('nickname', $nickname);
if (empty($user)) {
throw new Exception("No user named '$nickname'.");
}
- $group = User_group::staticGet('nickname', $groupname);
+ $group = User_group::getKV('nickname', $groupname);
if (empty($group)) {
throw new Exception("No group named '$groupname'.");
$member->created = common_sql_now();
if (!$member->insert()) {
- throw new Exception("Cannot add '$nickname' to '$groupname'.");
+ throw new Exception("Can't add '$nickname' to '$groupname'.");
}
}
$member->is_admin = 1;
if (!$member->update($orig)) {
- throw new Exception("Cannot make '$nickname' admin of '$groupname'.");
+ throw new Exception("Can't make '$nickname' admin of '$groupname'.");
}
} catch (Exception $e) {