Closed (fixed)
Project:
Password Policy
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2012 at 13:28 UTC
Updated:
16 May 2012 at 18:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
pdrake commentedInitial implementation.
Comment #2
pdrake commentedThis patch includes both the above change and the necessary variable management in password_policy_password_tab.install.
Comment #3
pdrake commentedAttached is a patch that will apply cleanly to 6.x-1.0-beta1 for anyone who may be running that version. Otherwise, this patch may be ignored.
Comment #4
erikwebb commentedWhat is the exact use case here? I understand making the URL more generic, but how does this make interoperability any easier than just a form alter?
Comment #5
pdrake commentedIn my use-case, it enables me to utilize this functionality with another module - specifically, chgpwd (see http://drupal.org/node/1424404).
Comment #6
erikwebb commentedI don't mean what module needs the integration. What is the point in making this more generic when someone could already use a form alter to modify whatever they need to?
Comment #7
pdrake commentedI'm afraid I don't understand. In this case, the redirect occurs in hook_init and redirects the user (via drupal_goto) to a particular URL when a password change is forced. I'm not sure how a hook_form_alter could cause this to behave differently, except maybe to perform yet another drupal_goto in the hook_form_alter?
Comment #8
erikwebb commentedAh I see. I don't think creating a redirect from a tab is good UX. I would suggest hiding the tab and creating a link within the normal user form. From the hook_menu() documentation -
Since your application would require a redirect, this no longer fits into the tab menu model.
Comment #9
pdrake commentedThe existing code redirects the user to a fixed URL which is supported by 1 module. It does this in hook_init if a password change is forced. The change I'm proposing is to redirect to a variable URL which is supported by 2 modules. It will still do this at hook_init if a password change is forced. This does not have anything to do with tabs or menu entries.
Comment #10
erikwebb commentedNow I fully understand. You're not really making the change tab more generic. This is actually an issue to make the password redirect overridable. My apologies for being a bit stubborn.
I think your patch is a bit too assumptive. I've changed the install functions to be more adaptive if another module has taken over this behavior. Also I've properly namespaced the variable.
Comment #11
erikwebb commentedComment #12
erikwebb commentedSorry, stupid syntax mistake.
Comment #13
gregglesLooks sane to me.
Comment #14
erikwebb commentedFixed and committed.
http://drupalcode.org/project/password_policy.git/commit/0e0fb93