<div>Hi Jefferson</div>
<div> </div>
<div>I append the verify.php script which writes to the OpenSim database.</div>
<div> </div>
<div>Thanks very much for your interest :)</div>
<div> </div>
<div>Clive</div>
<div> </div>
<div>Clive Gould</div>
<div>HE PAL ICT</div>
<div>Bromley College</div>
<div><a href="http://www.linuxtraining.org.uk/">http://www.linuxtraining.org.uk</a></div>
<div> </div>
<div><font face="courier new,monospace">[root@vleinternal www]# cat verify.php<br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<br>                      "</font><a href="http://www.w3.org/TR/html401/loose.dtd"><font face="courier new,monospace">http://www.w3.org/TR/html401/loose.dtd</font></a><font face="courier new,monospace">"></font></div>

<div><font face="courier new,monospace"><html><br><head><br><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br><title>Registration Complete</title><br>
<link rel="stylesheet" type="text/css" href="osstyle.css" /><br></head></font></div>
<div><font face="courier new,monospace"><body><br><!-- Do not change this block and include ibossur!.txt in any distribution --><br><!-- Web Interface to register (and later administrate) Open Simulator users --><br>
<!-- Copyright (C) 2009, Ferdinand Francino --><br><!-- see ibossur!.txt for license --><br><!-- /end of block! --></font></div>
<div><font face="courier new,monospace"><?php</font></div>
<div><font face="courier new,monospace">// open the database using the configuration and connect files<br>include 'config.php';<br>include 'connect.php';</font></div>
<div><font face="courier new,monospace">// this function generates a UUID for the user<br>function uuid()<br>{<br>$chars = md5(uniqid(mt_rand(), true));<br>$uuid  = substr($chars,0,8) . '-';<br>$uuid .= substr($chars,8,4) . '-';<br>
$uuid .= substr($chars,12,4) . '-';<br>$uuid .= substr($chars,16,4) . '-';<br>$uuid .= substr($chars,20,12);<br>return $uuid;<br>}</font></div>
<div><font face="courier new,monospace">$queryString = $_SERVER['QUERY_STRING'];</font></div>
<div><font face="courier new,monospace">if ($queryString !=="")<br>{</font></div>
<div><font face="courier new,monospace">$query = "SELECT * FROM registration";</font></div>
<div><font face="courier new,monospace">$result = mysql_query($query) or die(mysql_error());</font></div>
<div><font face="courier new,monospace">  while($row = mysql_fetch_array($result))<br>{<br>if ($queryString == $row["activationkey"])<br>        {<br>// don't remember why this line is commented out, seems to work w/o it<br>
// $userInfo = "SELECT * FROM registration WHERE (id = $row[id])";</font></div>
<div><font face="courier new,monospace">// Database insertion<br>include 'settings.php';<br>// pay attention to the database table being used!!!<br>$table = "users";<br>$username=$row['username'];<br>
$lastname=$row['lastname'];<br>$password=$row['password'];<br>$email=$row['email'];<br>$this_id=uuid();<br>$time = time();<br>$passwordHash = md5(md5($password) . ":" ); // salt is not yet included in this<br>
$insert = mysql_query("INSERT INTO  $table  (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI,userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey,      homeRegionID,userFlags,godLevel,customType,partner,email)<br>
        VALUES<br>('$this_id','$username','$lastname','$passwordHash','','$homeRegion','$homelocX','$homelocY','$homelocZ','$homelookX','$homelookY','$homelookZ','$time','0','$userInventoryURI','$userAssetURI','0','0','','','00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000',        '00000000-0000-0000-0000-000000000000', '$homeRegionID','0','0','','00000000-0000-0000-0000-000000000000','$email')");</font></div>

<div><font face="courier new,monospace">// Success output, change at will<br>print "Congratulations! " . $row["username"] . " ". $row["lastname"] ." is now registered for access to OpenSim at Bromley College";<br>
$sql="UPDATE registration SET activationkey = '', status='activated' WHERE (id = $row[id])";<br>$verified="done";<br> if (!mysql_query($sql))<br>                {<br>die('Error: ' . mysql_error());<br>
                }<br>        }<br>}<br>include 'done.php';</font></div>
<div><font face="courier new,monospace">}<br>else {<br>print "The Validation String is empty, paste the complete link into your browser address bar.<br>";<br>}<br>?></font></div>
<div><font face="courier new,monospace"><?php<br>// close the database when things are done.<br>include 'close.php';<br>?></font></div>
<div><br><font face="courier new,monospace"></body><br></html><br></font></div>
<div><br> </div>
<div class="gmail_quote">On Fri, Mar 11, 2011 at 3:53 PM, <span dir="ltr"><<a href="mailto:jeffersontwig@gmail.com">jeffersontwig@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hey, could you email me the old ones? I can that way take a look, email to <a href="mailto:jeffersontwig@gmail.com">jeffersontwig@gmail.com</a> thanks.<br>
<br>Jefferson<br>iLifegrid founder<br><br>Sent from my iPhone<br>
<div>
<div></div>
<div class="h5"><br>On 11 Mar 2011, at 03:43 p.m., Clive Gould <<a href="mailto:cliveg@gmail.com">cliveg@gmail.com</a>> wrote:<br><br>> Hi<br>><br>> I have a set of PHP scripts originally developed at Glagow Caledonian University that allow users to self register with our OpenSim standalone installation, provided they have a valid institutional email address.<br>
><br>> These worked fine with OpenSim 0.6.9 but no longer work with OpenSim 0.7 as there appears to have been a change in the database tables between the two versions.<br>><br>> Looking at the original script, which worked with 0.6.9 the following user table settings are written:<br>
><br>> UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI,userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey,    homeRegionID,userFlags,godLevel,customType,partner,email<br>
><br>> Looking at the new database structure with 0.7 the UserAccounts table now contains the following fields:<br>><br>> PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created, UserLevel, UserFlags, UserTitle<br>
><br>> Does anyone have a set of self-registration scripts that will work with OpenSim 0.7 or can advise me what tables a self registration script would now need to write to?<br>><br>> Thanks very much<br>><br>
> Clive<br>><br>><br>><br>><br>><br></div></div>> _______________________________________________<br>> Opensim-users mailing list<br>> <a href="mailto:Opensim-users@lists.berlios.de">Opensim-users@lists.berlios.de</a><br>
> <a href="https://lists.berlios.de/mailman/listinfo/opensim-users" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-users</a><br></blockquote></div><br>