echo "Resetting the system type of Spotweb to " . SpotCommandline::get('set-systemtype') . PHP_EOL; $svcUpgradeBase->resetSystemType(SpotCommandline::get('set-systemtype')); echo "System type changed" . PHP_EOL; } # if /* * If the user asked to change the preference of all users.. */ if (SpotCommandline::get('mass-userprefchange')) { $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;