#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'n:w:f:e:'; $longoptions = array('nickname=', 'password=', 'fullname=', 'email='); $helptext = << $nickname, 'password' => $password, 'fullname' => $fullname)); if (empty($user)) { throw new Exception("Can't register user '$nickname' with password '$password' and fullname '$fullname'."); } if (!empty($email)) { $orig = clone($user); $user->email = $email; // Throws exception on failure. $user->updateWithKeys($orig); } } catch (Exception $e) { print $e->getMessage() . "\n"; exit(1); }