Paul Coghlan a écrit :
As part of finalizing my integration of Drupal and Mediawiki I have decided to auto-create users at the point of creation within Drupal rather than let the AuthDrupal extension create them at some later point.
This gives me control over the userid as AuthDrupal allows them to drift, sync'ing by username and not userid.
Anyway, I am creating a trigger that creates the MW user but am not sure what goes into the user_token field. Can anyone give me a pointer as to how I generate this token?
Why not simply reuse the code for user creation from mediawiki ? it's in includes/SpecialUserLogin.php and User.php (User.php has a function setToken() that might help you)