What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello guys, we need to make one change in the authentication method, actually spryker uses the emai
Hello guys,
we need to make one change in the authentication method, actually spryker uses the email as username, but we need to change it for the phone number (phone).
We have two options for this change:
1.- overwrite the code of the classes, adding the phone as principal field of authentication,
2.- create a new module of spryker bassed on the existent functionality.
we need to know if its factible or if we goint to have problems with dependencies of this module? or can you help us making a suggestion about this.
currently exists this functionality? if so, they could tell us if we have to install any extra module or give us suggestions to implement it.
Comments
-
Hi Daniel,
the both options you’ve mentioned are relevant and it’s always a dilemma which way to go 🙂 Roughly, I would define it as following:
Create a new module when:
• Existing functionality (extension candidate) doesn’t really fit the purpose of your change - so you would have to overwrite a lot instead of re-use (also in the future perspective)
• Candidate for extension solves another problem conceptionally - you would have to misuse/overwrite the existing feature. (also in the future perspective)
Extend the existing functionality when:
• Most of the code fits your needs, you’re just missing a bit of a functionality (you’re going to re-use a lot)
• Fixing found core bugs or issues that prevent you to add your new functionality
• Extension is convenient to add and it will be encapsulated well enough and won’t heart future upgradeability0 -
I would categorise your issue - use phone instead of username - as rather an extension of the existing functionality. Add some missing methods to the client, e.g. “findUserByPhone” and use it instead of “findUserByEmail” - and provide necessary queries to make that happen
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random