auth::local::authentication::MergeUser (private)
auth::local::authentication::MergeUser from_user_id to_user_id \ [ authority_id ]
Defined in packages/acs-authentication/tcl/local-procs.tcl
Merge Implementation of local authentication. This will merge the names, emails, usernames, permissions, etc of the two users to merge.
- Parameters:
- from_user_id (required)
- to_user_id (required)
- authority_id (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- auth_authentication_implementations
Source code: ns_log Notice "Starting auth::local::authentication::MergeUser" db_transaction { ns_log Notice " Merging user portraits" ns_log notice " Merging username, email and basic info in general" set new_username "merged_$from_user_id" append new_username "_$to_user_id" # Shall we keep the domain for email? # Actually, the username 'merged_xxx_yyy' # won't be an email, so we will keep it without # domain set new_email $new_username set rel_id [db_string getrelid {}] membership_rel::change_state -rel_id $rel_id -state "merged" acs_user::update -user_id $from_user_id -username "$new_username" -screen_name "$new_username" party::update -party_id $from_user_id -email "$new_email" } ns_log notice "Finishing auth::local::authentication::MergeUser"XQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="auth::local::authentication::MergeUser.getrelid"> <querytext> select rel_id from cc_users where user_id = :from_user_id </querytext> </fullquery>packages/acs-authentication/tcl/local-procs.xql