I would like to make support for the password change tab more generic through the user of a variable so that modules such as chgpwd may be used with password_policy.

Files: 
CommentFileSizeAuthor
#12 password_policy-make_password_redirect_overridable-1424324-12.patch2.5 KBerikwebb
PASSED: [[SimpleTest]]: [MySQL] 334 pass(es).
[ View ]
#10 password_policy-make_password_redirect_overridable-1424324-10.patch2.49 KBerikwebb
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in sites/default/modules/password_policy/password_policy.install.
[ View ]
#3 password_tab_url-1424324-3-D6.patch1.65 KBpdrake
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch password_tab_url-1424324-3-D6.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#2 password_tab_url-1424324-2-D6.patch1.62 KBpdrake
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch password_tab_url-1424324-2-D6.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#1 password_tab_url-1424324-1-D6.patch791 bytespdrake
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch password_tab_url-1424324-1-D6.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

StatusFileSize
new791 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch password_tab_url-1424324-1-D6.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Initial implementation.

Status:Active» Needs review
StatusFileSize
new1.62 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch password_tab_url-1424324-2-D6.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

This patch includes both the above change and the necessary variable management in password_policy_password_tab.install.

StatusFileSize
new1.65 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch password_tab_url-1424324-3-D6.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Attached 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.

Status:Needs review» Postponed (maintainer needs more info)

What 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?

Status:Postponed (maintainer needs more info)» Needs review

In my use-case, it enables me to utilize this functionality with another module - specifically, chgpwd (see http://drupal.org/node/1424404).

I 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?

I'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?

Status:Needs review» Closed (works as designed)

Ah 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 -

Local tasks are menu items that describe different displays of data, and are generally rendered as tabs.

Since your application would require a redirect, this no longer fits into the tab menu model.

Status:Closed (works as designed)» Needs review

The 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.

Title:Make password change tab support more genericMake password redirect URL overridable
Status:Needs review» Needs work
StatusFileSize
new2.49 KB
FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in sites/default/modules/password_policy/password_policy.install.
[ View ]

Now 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.

Status:Needs work» Needs review

StatusFileSize
new2.5 KB
PASSED: [[SimpleTest]]: [MySQL] 334 pass(es).
[ View ]

Sorry, stupid syntax mistake.

Looks sane to me.

Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

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