-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
fix: transferusers.php #1084
fix: transferusers.php #1084
Conversation
Updating transferusers.php for the new database changes. Now tranfered users by this script are listed properly in the admin panel and can use services. see issue at: https://discord.com/channels/787829714483019826/850551820018384907/1320901027649683506
why you say it contain breaking changes ? your only modifying a third party script |
also checking this script / code it contains many things wrong, in relation to the fix or not |
@RaphaelCapone Thanks for the PR, but could you please make these changes in the development branch instead of the main? Also, you added a php closing tag, which is not correct according to the norms of writing code in php. |
Otherwise, everything looks correct, good job |
Correct $CPPPG_PASSWORD to $CPGG_PASSWORD. |
No, because the default role IDs are not changeable. They are the same for all instances |
yes but you still should never use IDs 99% of the time. its just something that wait to break here |
anyway @RaphaelCapone you can only do your fix, if you dont want to fully fix this code I may refactor it in the future, thanks you |
In that case, how do you see the implementation of this? This is how the permission system works, and to fix it you need to change the backend of the CtrlPanel itself |
idk how the backend is made but if you have a mysql row saying, role name = this string you can search by name and not by ID, IDs are normally automatically generated by mysql and are unpredictable anyway |
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.
LGTM, but I'll wait for the review from @1day2die , he's more familiar with his script after all 😅
I think we should accept this fix and I will further refactor and fix this script, also this script have nothing to do here, it should be in the app/Console/Commands directory for laravel |
I know fields are kinda confusing, but the thing is that, in my change, after the new users are imported it just gets their ID(not setting it manually or anything) in order to set the right ID in the The model_has_roles table will look like that [the id in this case could be for example if the user used the outdated script, deleted users by loggin manually in their account and then updating the script and start again importing the ptero users, so its specially made for not messing up things] |
💡 Description
Updating transferusers.php for the new database changes. Now tranfered users by this script are listed properly in the admin panel and can use services. see issue at: https://discord.com/channels/787829714483019826/850551820018384907/1320901027649683506
🛠️ Type of Change
Breaking change