Giter Club home page Giter Club logo

Comments (7)

christianwach avatar christianwach commented on May 27, 2024 1

@linssen Ah, I see - fair point. Yours is a deliberate override of the username rather than a last resort approach - though the end result is the same. I'll add a new filter where you suggest so as to avoid confusion for those taking a defensive approach.

Another thing that would make it even more useful would be to select more columns, thus the $rows param would have more to play with

Calls for another filter, methinks. Give me a couple of mins...

from civicrm-wp-profile-sync.

christianwach avatar christianwach commented on May 27, 2024

@linssen To be accurate, there's an extra attempt to create a user after step (3) where username = first + middle + last and if this too fails then the civicrm_wp_profile_sync_unique_username filter is applied. Can you explain how moving the filter would help avoid duplicate usernames?

from civicrm-wp-profile-sync.

linssen avatar linssen commented on May 27, 2024

Largely it would just mean a uniform approach to usernames for all contacts. For example, in our case we already have a field for a globally unique member id: we'd want to use that. With the plugin being called later on, we would have 90% of our users with the username firstname.lastname and 10% using their unique member id.

I suggest using it is an override hook at the beginning of the username generation.

Another thing that would make it even more useful would be to select more columns, thus the $rows param would have more to play with a * would be perfect in our case, since it would include all the data we'd want to build a totally unique username.

from civicrm-wp-profile-sync.

christianwach avatar christianwach commented on May 27, 2024

@linssen I've added some filters in e366a9b that should help you out. You can now filter the query, contact data rows and username.

from civicrm-wp-profile-sync.

linssen avatar linssen commented on May 27, 2024

Looks like exactly what I was hoping for, thanks! Worth adding to the readme?

from civicrm-wp-profile-sync.

christianwach avatar christianwach commented on May 27, 2024

@linssen I really don't want to do endless free support for non-technical folks on this - hence why the bulk constant is off by default. I'll review the readme, but I doubt I'll highlight this.

from civicrm-wp-profile-sync.

linssen avatar linssen commented on May 27, 2024

Fair enough. Really appreciate this, thanks @christianwach.

from civicrm-wp-profile-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.