Preliminary: first of all, remove GetNewUserId? from DoNewLogin.
The rest of implementation is possible with patchs like WikiPatches/LoginRework.
# Create a new user file/cookie pair sub DoNewLogin { # Consider warning if cookie already exists # (maybe use "replace=1" parameter) &CreateUserDir(); - $SetCookie{'id'} = &GetNewUserId(); - $SetCookie{'randkey'} = int(rand(1000000000)); - $SetCookie{'rev'} = 1; - %UserCookie = %SetCookie; - $UserID = $SetCookie{'id'}; - # The cookie will be transmitted in the next header - %UserData = %UserCookie; - $UserData{'createtime'} = $Now; - $UserData{'createip'} = $ENV{REMOTE_ADDR}; &SaveUserData(); }
--JuanmaMP