From cbb76b640d7e9f772ac4d06696b7a156b5c40cf7 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 28 Nov 2007 19:14:42 +0000 Subject: restore accidently removed code and give it a better comment not to be misunderstood. --- BitUser.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/BitUser.php b/BitUser.php index 8bd7981..5f810da 100644 --- a/BitUser.php +++ b/BitUser.php @@ -1,6 +1,6 @@ - * @version $Revision: 1.164 $ + * @version $Revision: 1.165 $ * @package users * @subpackage BitUser */ @@ -295,6 +295,11 @@ class BitUser extends LibertyAttachable { trim_array( $pParamHash ); + // DO NOT REMOVE - to allow specific setting of the user_id during the first store. + // used by ROOT_USER_ID or ANONYMOUS_USER_ID during install. + if( @$this->verifyId( $pParamHash['user_id'] ) ) { + $pParamHash['user_store']['user_id'] = $pParamHash['user_id']; + } if( !empty( $pParamHash['login'] ) ) { if( $this->userExists( array( 'login' => $pParamHash['login'] ) ) ) { $this->mErrors['login'] = 'The username "'.$pParamHash['login'].'" is already in use'; -- cgit v1.3