Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drifter’s picture

Status: Active » Needs review
FileSize
3.91 KB

Here's an initial implementation that works for me.

erikwebb’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
FileSize
5.68 KB

Try this version for me. I've just done some reformatting and changed the menu structure to match D7.

erikwebb’s picture

Category: task » bug
Priority: Normal » Major
FileSize
7.7 KB
erikwebb’s picture

jamesray’s picture

Still doesn't appear to work quite yet! I've tried using RC2, and 7.x-1.x-dev from Mar 2nd. I'll just turn off that feature for now.

Just incase you need any additional information, here are the errors that pop-up when viewing a user account:

Warning: Missing argument 2 for user_category_load(), called in /var/www/includes/menu.inc on line 593 and defined in user_category_load() (line 1914 of /var/www/modules/user/user.module). 
Warning: Missing argument 3 for user_category_load(), called in /var/www/includes/menu.inc on line 593 and defined in user_category_load() (line 1914 of /var/www/modules/user/user.module). 
Warning: array_slice() expects parameter 1 to be array, null given in user_category_load() (line 1927 of /var/www/modules/user/user.module). 
Warning: implode(): Invalid arguments passed in user_category_load() (line 1927 of /var/www/modules/user/user.module). 
charlie_love’s picture

That is exactly the same error as I get.

When I click on the password tab I get an extended set of errors and no password change form.

erikwebb’s picture

This patch isn't yet committed. Are you seeing these errors after applying this patch?

erikwebb’s picture

Status: Needs review » Needs work

Nevermind, I'm seeing the issue too.

erikwebb’s picture

Status: Needs work » Needs review
FileSize
8.81 KB

Actually, yes. I'm not seeing those errors with this new patch applied.

phen’s picture

Not sure if this is the right place to post this... The patch at Changing location of password tab in password_policy_password_tab has broken functionality in password_policy needs to be ported to D7 too, it is closely related to the password change tab.

Thanks!

greggles’s picture

Status: Needs review » Needs work

This hunk no longer applies. I tried to merge by hand, but the code has changed quite a bit.

diff --git a/password_policy.module b/password_policy.module
index 0a2b934..b202d3c 100644
--- a/password_policy.module
+++ b/password_policy.module
@@ -408,9 +408,10 @@ function password_policy_form_alter(&$form, $form_state, $form_id) {
   switch ($form_id) {
     case 'user_profile_form':
     case 'user_register_form':
+    case 'password_policy_password_tab':
       // Force password change on user account.
       if (user_access('force password change')) {
-        if ($form['#user_category'] == 'account') {
+        if (isset($form['#user_category']) && $form['#user_category'] == 'account') {
           $force_change = db_query_range('SELECT force_change FROM {password_policy_force_change} WHERE uid=:uid', 0, 1, array(':uid' => $form['#user']->uid))->fetchField();
         }
         else {
erikwebb’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, password_policy-update_password_change_tab_d7-1330502-9.patch, failed testing.

erikwebb’s picture

Status: Needs work » Needs review
FileSize
8.5 KB
erikwebb’s picture

erikwebb’s picture

erikwebb’s picture

Status: Needs review » Needs work

The last submitted patch, password_policy-update_password_change_tab_d7-1330502-18.patch, failed testing.

erikwebb’s picture

erikwebb’s picture

Status: Needs work » Needs review
erikwebb’s picture

Reformatted patch as well as added testing.

erikwebb’s picture

erikwebb’s picture

Status: Fixed » Closed (fixed)

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

mloigeret’s picture

Hello

I've applied the latest patch because I was getting the "Recoverable fatal error: Argument 1 passed to drupal_http_build_query()..." message.
But now the password tab form always ask me to enter the old password before the new one.
I want to redirect my users to the password tab when they have lost their password so it is a probelm.

Is there a way to remove the old password field?

Thank you

erikwebb’s picture