A D7 version of this module might be nice. I'm working on an initial version. Anyone else interested?

Comments

alberto56’s picture

Status: Active » Needs review
StatusFileSize
new5.36 KB

Here is a patch that works on my test site. I created the patch by following the instructions here.

Basically, (1) I used coder to generate the basic patch, and (2) I changed the form id from "user_register" (drupal 6) to "user_register_form" (drupal 7).

Cheers,

Albert.

joelstein’s picture

Thanks for the patch! I look forward to reviewing it. It's on my radar.

alberto56’s picture

StatusFileSize
new4.51 KB

Here's an updated patch that seems to work with the new D7 beta (although I haven't completely tested every aspect of it yet).

I had to remove the submit callback reference which is harmless (and useless?) in D6 but breaks D7, as explained in #937160: form[#submit][] set to genpass_user_admin_settings_submit, but function does not exist and is not called..

alberto56’s picture

StatusFileSize
new1.49 KB

Hi,

here's a cleaner version of this patch. Note that not much is changed from D6:

- core is 7 instead of 6.
- module file is explicitly included in the info file
- the form user_register (in D6) now called user_register_form.
- removed the submit callback reference (see above)
- I also added the Drupal path in the comments next to the form IDs for easier reference, in part because these have changed since D6.

Cheers,

Albert.

joelstein’s picture

Category: feature » task
StatusFileSize
new10.3 KB

Great work. Here's a zip for you to try out until I have time to commit it. I made several other changes (mostly better documentation).

danepowell’s picture

Status: Needs review » Reviewed & tested by the community

Works well for me!

danepowell’s picture

Can you please commit this and make at least a dev release? I need to be able to grab this with drush_make. Thanks!

danepowell’s picture

Title: drupal 7 version » GenPass: Drupal 7 port

Renaming, so I can tell this apart from all of the other d7 port issues in my queue

pixelsweatshop’s picture

sub. looking forward to a commit.

danepowell’s picture

Just FYI, I think this breaks password reset functionality. Sorry I can't provide more detail than that- I just know that users weren't able to reset their password and disabling genpass solved the problem. Still, it might be worth it to go ahead and commit this patch and open a new issue.

arla’s picture

I'm getting a notice using #5 genpass.zip:

"Notice: Undefined index: #description in genpass_form_alter() (line 143 of ...\genpass.module)."

I just added some account fields, most of them without any help text (I don't know if that's what's indicated by "#description"). I'm not sure what additional information I should provide in order for someone to recognize the bug.

arla’s picture

I've been looking through the code a little. From what I can tell, it seems like genpass_form_alter doesn't take the e-mail verification setting into consideration. If e-mail verification is enabled and genpass_mode is not RESTRICTED, then the register form will throw a notice.

I'm not an experienced module developer so I'm not quite sure what should be done, but I'm guessing we should check for variable_get(user_email_verfication) in genpass_form_alter. Or check whether _genpass_get_form_item($form, 'pass') returns anything.

Hope I helped!

danepowell’s picture

Can we go ahead and commit this version as 7.x-1.x-dev, and then spin off any separate issues against that? Otherwise this thread is likely to turn into a rat's nest of issues...

joelstein’s picture

Status: Reviewed & tested by the community » Fixed

Good call. Sorry for the delay. The D7 branch has been created with the zip file from #5 (above).
http://drupal.org/node/1229106

I'll call this issue fixed. Please open up new D7 problem in separate issues as you find them.

danepowell’s picture

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

my-family’s picture

The dev version works nice, thanks. Will it be the official release (in the download table on the module page)? Thank you for this very useful module.

SolomonGifford’s picture

The 7 version works fine -