backdrop-contrib / simplesamlphp_auth

Support SAML for authentication of users. The module will auto-provision user accounts and dynamically assign roles in Backdrop CMS if you want it to.
https://backdropcms.org/project/simplesamlphp_auth
GNU General Public License v2.0
2 stars 3 forks source link

Notice: Undefined index: #markup in simplesamlphp_auth_form_alter() #35

Open argiepiano opened 1 year ago

argiepiano commented 1 year ago

When inserting a Login block anywhere in the layout, this module generates:

Notice: Undefined index: #markup in simplesamlphp_auth_form_alter() (line 556 of /Users/XXX/Sites/localhost/XXX/modules/simplesamlphp_auth/simplesamlphp_auth.module).

There seems to be a difference between this block in D7 and Backdrop. In D7, the block contained links as markup. In Backdrop, there are themed as an item_list, and therefore there is no #markup key, and the str_replace should be applied differently.

laryn commented 1 year ago

@argiepiano You're right, there was a change in user_login_block between Drupal 7 and Backdrop (Drupal pre-rendered the item_list for some reason). It looks like we may not need str_replace at all, but just to add this new link at the end of the item_list array.

I don't see links at all in user_account_form so I wonder if that whole next section should be chopped out.