right now, the code that actually generates the random users lives directly in the form submit handler for the devel_generate.module's UI ( devel_generate_users_form_submit() to be precise). that's lame. there should be a devel_create_users() function in devel_generate.inc which a) would be called from the submit handler, but b) could be called from other places, too.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | user_81.patch | 2.9 KB | webchick |
| #2 | devel_create_users.patch_1.txt | 3.17 KB | dww |
| #1 | devel_create_users.patch.txt | 3.13 KB | dww |
Comments
Comment #1
dwwComment #2
dwwforgot to mention, my previous patch fixes a few bugs, too:
db_next_id('{users_uid}');, should bedb_next_id('{users}_uid');db_query("UPDATE {sequences} SET id = %d WHERE name = 'users_uid'", $uid);for two reasons: a) 'users_uid' isn't being prefixed and b) the whole thing doesn't belong there, now that this function is properly using db_next_id()...for ($i = 2; $i <= $num; $i++) {is a hold-over from when we were hard-coding that we always nuked everything and started after uid 1. so, previously, we'd always generate N-1 users when N were requested, even though we'd lie and say we created all N of them. ;) try it yourself and ask the existing thing to generate you 1 user...speaking of which, i re-rolled to use format_plural() for that drupal_set_message. ;)
Comment #3
webchickMuch easier to use now, but we really need some kind of indication of what that asterisk means (or else use a different marker -- elsewhere in core, * means 'required').
Here's a patch that prepends a simple description to the block:
* = user who may switch back
same font style as the description for the user search box.
Comment #4
webchicksigh. ;) replied to wrong issue. ;)
Comment #5
webchickExcellent improvement. Tested and works great. RTBC. :)
Comment #6
dwwthanks for the review, webchick. committed to DRUPAL-5 and HEAD (which took a little porting, since the patch didn't apply cleanly).
Comment #7
(not verified) commented