-/* importUser
- $uid is the UseMod user id number.
- The new ones will be assigned arbitrarily and are for internal use only.
-
- THIS IS DELAYED SINCE PUBLIC DUMPS DONT INCLUDE USER DIR
- */
-function importUser( $uid )
-{
- global $last_uid, $user_list, $wgTimestampCorrection;
- die("importUser NYI");
- return "";
-
- $stuff = fetchUser( $uid );
- $last_uid++;
-
- $name = wfStrencode( $stuff->username );
- $hash = md5hash( $stuff->password ); # Doable?
- $tzoffset = $stuff['tzoffset'] - ($wgTimestampCorrection / 3600); # -8 to 0; +9 to +1
- $hideminor = ($stuff['rcall'] ? 0 : 1);
- $options = "cols={$stuff['editcols']}
-rows={$stuff['editrows']}
-rcdays={$stuff['rcdays']}
-timecorrection={$tzoffset}
-hideminor={$hideminor}
- ";
-
- $sql = "INSERT
- INTO user (user_id,user_name,user_password,user_options)
- VALUES ({$last_uid},'{$name}','{$hash}','{$options}');\n";
- return $sql;
-}
-