Posted by YesCT on April 3, 2010 at 6:00am
5 followers
Jump to:
| Project: | Generate Password |
| Version: | 6.x-1.0-beta5 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
I had to hack this module to get my module to work with genpass (http://drupal.org/node/651106#comment-2789508).
Please add a way for other modules to specify which forms should work with genpass without needing to manually add a case: to genpass_form_alter
Comments
#1
Hmm, this would involve a rework of the settings-administration. Currently all the genpass stuff is placed under admin/user. If we want to add options for other forms, we would need a settings-page for genpass only. I have no time to do this right now, so this will be postponed.
sorry :S
#2
OK.
... Is there a way to do this and get around that?
Ummm. What about a API addition or adding some extra argument to a function already in there so old calls to it still work. Could leave the gui settings just like they are. :)
I think I remember that extra arguments are passed on to the function... so something like
<?phpfunction genpass_form_alter(&$form, $form_state, $form_id, $extra_form_id_array) {...}
?>
and $extra_form_id_array would be an array of form ids.
..... hmmm maybe some function to save the list of form_id's allowed to use genpass in a variable somewhere?
#3
I'm not sure how this module would do what you're wanting of it. It sounds like you are creating your own user registration form, in which case you probably have your own logic, right? In order for genpass to help you, we'd have to change a considerable amount of code. The only way I could see that happening is if you found a use case which could be wide enough to be worth the effort.
Otherwise, I recommend copying and pasting the code from genpass's hook_form_alter into your custom module.
#4
Would be lovely to use this in combination with Logintoboggan to auto-generate the password for folks and immediately log them in.