-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Adding a customer ID to the user #147
Conversation
So, this is one more ID? More human friendly. I am trying to get the purpose of having this in default implementation. Is there some other use case except for invoices? |
This ID could be used for invoicing and given by the user when he contacts the support of the shop. Nothing more you're right |
It can also be easier to retrieve a client in the BO with this kind of ID |
public function findUserByCustomerId($customerId) | ||
{ | ||
return $this->findUserBy(array('customerId' => $customerId)); | ||
} |
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.
While FOSUser handles it differently, I believe that such methods should live in repository - let's make this one private as it's used only in manager and shouldn't be public api. What do you think?
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.
yep
Sounds like good addition to me! I'll be happy to merge when rebased + my comments and if nobody has something against it, let me hear your thoughts! Thanks! |
FYO @pjedrzejewski I did not want to do this PR this way. My first approach was to use |
Oh yes this sounds much better! And I agree we should definitely update. :) |
OK, so I'll close this one and open a new one to update FOS User and set the customer ID ;) |
@pjedrzejewski just for you to know, tomorrow is my birthday so if you want to push the update on that day... :D |
Closed in favor of #165 |
Added support for Configuration Blocks
This PR refers to #116.
I did not have many feedbacks but I try anyway ;)
The customer ID is made with : 4 letters of last name + 2 letters of first name + random number. The customer ID is 10 characters long.