Closed alaa-alsalehi closed 6 years ago
@Monter you've weighed in before. What are your thoughts on this PR?
@ServeMe this is a solid PR, but there are some changes I'd like to make before merging it in.
The main issue is we have to keep the current REST version v1
for backwards compatibility. I don't mind there being a v2
that implements your suggestions, or even another route that is used instead still keeping the v1
API.
I hope that makes sense!
check it now @ronalfy I think it is fine now
@ServeMe this looks good. I'll see about merging and releasing this weekend. Thanks for the contribution.
@ronalfy I want to add a condition for change profile picture "if the user who want to set the profile picture is the same person who upload the picture" does that make any sense?
Yeah, it makes sense. I'll wait for you until you say it's ready for testing.
all is good now check it @ronalfy
do you check it @ronalfy ? please do and publish I can not wait to use it on my website
So sorry for the delayed response. The code looks good, but I'm worried that users without the right privileges can modify profile images.
Would you be so kind as to demonstrate how someone would use this?
Dear @ronalfy actually that is not possible I do not take a user parameter in the request I rely on get_current_user_id
so if the user is logged he can change his user profile otherwise he will kicked out with 403 http error
if you need any explanation let me know
@ServeMe I added a capabilities check in dev. Before I push this live, can you please confirm that your REST tests are successful?
Assuming it works, can you show some working examples so I can add it to the docs?
add three profile picture sizes like Gravatar modify the api to add the profile picture in user in replace for new route add new route to put a media already uploaded picture as a profile picture