#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'i:n:r:d'; $longoptions = array('id=', 'nickname=', 'role=', 'delete'); $helptext = <<nickname' ($user->id)..."; try { $user->revokeRole($role); print "OK\n"; } catch (Exception $e) { print "FAIL\n"; print $e->getMessage(); print "\n"; } } else { print "Granting role '$role' to user '$user->nickname' ($user->id)..."; try { $user->grantRole($role); print "OK\n"; } catch (Exception $e) { print "FAIL\n"; print $e->getMessage(); print "\n"; } }