The remember me button displays next to User Login link. I suspect it shouldn't be there when the block configuration is set to Block type: link. I don't remember seeing the button in previous versions.

Comments

markus_petrux’s picture

Status: Active » Needs review

hmm... using Persistent Login (PL) with Login Toboggan (LT), I guess. :)

Well, this is probably a side effect of the method PL is using now to adjust the weight and tabindex attributes of the "Remember me" button. The previous method was dependent on the loading order of modules (based on the weight column in the system table and relative path of the module in the installation). So I opted to implement an after_build callback installed on hook_form_alter(). This technique is pretty uncommon, so that gives the opportunity to check what other modules have done to the login form. It just happens that LT replaces the form with a link, and PL doesn't take this into account.

Could you please try the following mini-patch to persistent_login.pages.inc ?

 function persistent_login_form_after_build($form, &$form_state) {
+  // If we don't have a submit button, then it's a sign someone else altered
+  // the login form in a way that cannot be submitted, so we remove the
+  // "Remember me" checkbox we added in hook_form_alter() and quit.
+  if (!isset($form['submit'])) {
+    unset($form['persistent_login']);
+    return $form;
+  }

   // FAPI ensures a weight is assigned to all elements before after_build
   // callback is invoked.

   // Get the weight assigned to the submit button.
   $original_submit_weight = $form['submit']['#weight'];
jtjones23’s picture

Yes, PL and LT are on my list of must-use modules:)

Patch successfully removes "remember me" check box from login link. I tried the patch on my local dev site and a live site. Worked both times.

Thanks for the fast reply.

markus_petrux’s picture

Status: Needs review » Fixed

Sweet. Thanks for confirming. Committed to CVS. :)

Status: Fixed » Closed (fixed)

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