OK, I have put back the original and changed the datatype from text to varchar
now its inserting a 0 in the row.....
EDIT: seemed to have got it adding the randomString to the db now but when i click on the verify link in the email its still saying link expired. It works fine if the email is sent from the user-update page.....
On the registration email, the email address is not being added at the end of the slug as
<a href="http://www.domain.co.uk/user-confirm.php?id=<?php echo $_SESSION['SecurityAssist_UserID']; ?>&randomString=<?php echo $_SESSION['rpw']; ?>&email=<?php echo((isset($_POST["Registration_group_UserEmail"]))?$_POST["Registration_group_UserEmail"]:"") ?>">click here</a>