Comments (7)
@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.
@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.
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.
@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.
Looks like exactly what I was hoping for, thanks! Worth adding to the readme?
from civicrm-wp-profile-sync.
@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.
Fair enough. Really appreciate this, thanks @christianwach.
from civicrm-wp-profile-sync.
Related Issues (20)
- Civi Relationship and ACF Relationship
- Cannot select existing contact in CiviCRM Contact: Existing/New field HOT 6
- File upload for custom contact field? HOT 1
- Bi-directional-Sync works but if wp-post created first, no civi-contact are created HOT 7
- Sync custom post type with events HOT 3
- May a CPT without title field be used to sync CiviContact HOT 4
- "Undefined index: contact_type_a" in log while relationships seems well defined HOT 8
- how to use wp action like "save_post" along cwps : any recomendations ? HOT 4
- PHP 8 Deprecation Notices HOT 3
- Primary Email update HOT 39
- Contact action : Not enough data to save a Contact HOT 18
- ACFE Form action: remove from group HOT 2
- Contact deletion: sync do not occur when Users are bulk deleted in WordPress
- Editing a Participant in CiviCRM clears some Participant Fields in ACF unless it is saved twice in CiviCRM HOT 2
- File field: mapping ok, but nothing happens when using ACFE forms
- CiviCRM Participant not create when WP-Participant is created programmatically HOT 2
- Sync a WordPress taxonomy to an ACF custom field of type radio or checkbox HOT 1
- Add option to disable nickname syncing HOT 1
- profile sync filling ConfigAndLog with Authentication Failures on CiviCRM 5.57+ HOT 9
- Request to add support for syncing of built-in WordPress User Profile Picture with CiviCRM Contact Image Field HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from civicrm-wp-profile-sync.