$prefToChange = explode("=", SpotCommandline::get('mass-userprefchange')); if (count($prefToChange) != 2) { throw new Exception("Please specify new preference as follows: perpage=10 or count_newspots=off"); } # if echo "Mass changing a users' preference " . $prefToChange[0] . " to a value of " . $prefToChange[1] . PHP_EOL; $svcUpgradeBase->massChangeUserPreferences($prefToChange[0], $prefToChange[1]); echo "Users' preferences changed" . PHP_EOL; } # if /* * If the user asked to reset the password of a user */ if (SpotCommandline::get('reset-password')) { echo "Resetting the password of '" . SpotCommandline::get('reset-password') . "' to 'spotweb'" . PHP_EOL; $svcUpgradeBase->resetPassword(SpotCommandline::get('reset-password')); echo "Password changed" . PHP_EOL; } # if /* If the user asked to reset group membership, reset all group memberships */ if (SpotCommandline::get('reset-securitygroups')) { echo "Resetting security groups to their default settings" . PHP_EOL; $svcUpgradeBase->resetSecurityGroups(); echo "Reset security groups to their default settings done" . PHP_EOL; } # if /* * If the user asked to reset group membership, reset all group memberships. */ if (SpotCommandline::get('reset-groupmembership')) { echo "Resetting users' group membeship to the default" . PHP_EOL;