diff options
author | Adam Frisby | 2007-07-11 08:02:47 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-11 08:02:47 +0000 |
commit | 5c7ffdde0b9642a42e8f5987e06eb01220ff7776 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /share/php/generateUserFunction.php | |
parent | Who would have known that the only way of specifying utf-8 without preamble, ... (diff) | |
download | opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.zip opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.gz opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.bz2 opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.xz |
* Wiping trunk in prep for Sugilite
Diffstat (limited to '')
-rw-r--r-- | share/php/generateUserFunction.php | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/share/php/generateUserFunction.php b/share/php/generateUserFunction.php deleted file mode 100644 index 52ebc9f..0000000 --- a/share/php/generateUserFunction.php +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | <?php | ||
2 | // GenerateUser (v1.0) | ||
3 | // Creates a new user account, and returns it into an associative array. | ||
4 | // -- | ||
5 | // $firstname - The users firstname | ||
6 | // $lastname - The users lastname | ||
7 | // $password - the users password | ||
8 | // $home - the regionhandle of the users home location | ||
9 | // -- | ||
10 | function generateUser($firstname,$lastname,$password,$home) { | ||
11 | $user = array(); | ||
12 | $user['UUID'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', | ||
13 | mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), | ||
14 | mt_rand( 0, 0x0fff ) | 0x4000, | ||
15 | mt_rand( 0, 0x3fff ) | 0x8000, | ||
16 | mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) ); | ||
17 | $user['username'] = $firstname; | ||
18 | $user['lastname'] = $lastname; | ||
19 | |||
20 | $user['passwordSalt'] = md5(microtime() . mt_rand(0,0xffff)); | ||
21 | $user['passwordHash'] = md5(md5($password) . ":" . $user['passwordSalt']); | ||
22 | |||
23 | $user['homeRegion'] = $home; | ||
24 | $user['homeLocationX'] = 128; | ||
25 | $user['homeLocationY'] = 128; | ||
26 | $user['homeLocationZ'] = 128; | ||
27 | $user['homeLookAtX'] = 15; | ||
28 | $user['homeLookAtY'] = 15; | ||
29 | $user['homeLookAtZ'] = 15; | ||
30 | |||
31 | $user['created'] = time(); | ||
32 | $user['lastLogin'] = 0; | ||
33 | |||
34 | $user['userInventoryURI'] = "http://inventory.server.tld:8004/"; | ||
35 | $user['userAssetURI'] = "http://asset.server.tld:8003/"; | ||
36 | |||
37 | $user['profileCanDoMask'] = 0; | ||
38 | $user['profileWantDoMask'] = 0; | ||
39 | $user['profileAboutText'] = "I am a user."; | ||
40 | $user['profileFirstText'] = "Stuff."; | ||
41 | $user['profileImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 ); | ||
42 | $user['profileFirstImage'] = sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 0, 0, 0, 0, 0, 0, 0, 0 ); | ||
43 | |||
44 | return $user; | ||
45 | } | ||
46 | ?> \ No newline at end of file | ||