Skip to content

Problem with $force_update in shibboleth_update_user_data #28

Description

I was asked to generate a semi-random (need to be unique) nickname on initial account creation and the implementation of Shibboleth seems to conflict with user_register hook.

I was able to work around this by using shibboleth_user_nickname but I was actually surprised to discover the $force_update flag in the fonction shibboleth_update_user_data.

2 observations :

  1. You absolutely need to set a filed mapping value (in admin option) even if "managed" is check to false (otherwise it generate index error visible in debug).

  2. wp_update_user($user_data) write over the value that is set by my user_register hook (not surprisingly as it's called after). Considering the value is not checked "managed" I would have assumed that it would have been handled as such even in account creation.

I would consider this as a bug but I dont see the use case of $force_update? Maybe it's just a missing check to skip over undefined mapping?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions