-
Notifications
You must be signed in to change notification settings - Fork 182
Add script to remove external IDs from users #13721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Venus-22.10.0
Are you sure you want to change the base?
Conversation
Introduces removeExternalIdFromUser.php, an alpha script for removing external IDs from users of a specified partner, based on a provided CSV list. Supports dry run and real run modes, generates a CSV report of the operation, and includes error handling and logging.
|
@github-copilot suggest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces an alpha script to remove external IDs from users of a specified partner. The script reads user IDs from a CSV file, removes their external IDs, and generates a detailed CSV report of the operation.
- Adds a command-line script with support for dry-run and real-run modes
- Implements CSV parsing with flexible header detection (case-insensitive 'puserId' column)
- Generates timestamped CSV reports tracking which users were updated
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Renamed functions for consistency (removeExternalIDFromuser to removeExternalIdFromUser, writeReportoCsv to writeReportToCsv) and updated variable names for clarity. Improved and expanded PHPDoc comments for better maintainability. Fixed report filename generation and corrected criteria variable names in getPUsersIn.
|
@github-copilot suggest |
|
|
||
| $puserCriteria = new Criteria(); | ||
| $puserCriteria->add(kuserPeer::PARTNER_ID, $partnerId, Criteria::EQUAL); | ||
| $puserCriteria->add(kuserPeer::STATUS, KuserStatus::DELETED, Criteria::NOT_EQUAL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orekalt no need to set STATUS criteria- kuserPeer sets this as part of its default criteria.
server/alpha/lib/model/om/BasekuserPeer.php
Line 572 in 67c468c
| kuserPeer::setDefaultCriteriaFilter(); |
Introduces removeExternalIdFromUser.php, an alpha script for removing external IDs from users of a specified partner, based on a provided CSV list. Supports dry run and real run modes, generates a CSV report of the operation, and includes error handling and logging.
Pull Request Checklist
Please complete the following before submitting:
General notes -
New Kaltura Types
New Kaltura Services / Actions
Questions
What is the purpose of this PR?
Does this change affect production code or infrastructure?
If yes, what is the rollback plan?