Project

General

Profile

Actions

Feature #8639

closed

Add photo upload to registration page

Added by Boone Gorges over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Daniel Jones
Category name:
Registration
Target version:
Start date:
2017-08-31
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

See https://chris0stein.github.io/commons-ux/registration/index.html

Currently, avatar uploads take place after the first page of registration is complete. We'd like to move it inline.

Dan, can I ask you to have an initial look? There'll be two tricky bits:

1. Putting the avatar upload UI on this page. Check out the avatar upload tool built into BP (see https://commons.gc.cuny.edu/members/[username]/profile/change-avatar/). I think that it should be fairly portable - you just need to figure out what to enqueue, etc.

2. Figure out a way to store the avatar and associate it with a user. BP avatars are stored in wp-content/blogs.dir/1/files/avatars, in directories keyed by user IDs. (Use wp_upload_dir() to get the base path.) When a user registers, however, there is no user ID yet. BuddyPress used to do this by (a) using a hash of the signup key for temporary storage https://buddypress.trac.wordpress.org/browser/tags/1.2.7/bp-core/bp-core-signup.php?marks=171#L165, and then moving the file at the time of activation (when the user account is created) https://buddypress.trac.wordpress.org/browser/tags/1.2.7/bp-core/bp-core-signup.php?marks=228,233-234#L206. Something like this seems like a workable technique.

If it's not too much trouble, let's put as much of the logic as we can into a separate plugin, in case we want to release it.

Let me know if you need more pointers!


Files

Peek 2017-10-16 21-06.gif (1.18 MB) Peek 2017-10-16 21-06.gif Boone Gorges, 2017-10-16 10:11 PM

Related issues

Related to CUNY Academic Commons - Bug #8813: `cac_activity_secondary_avatar_enlarge()` can generate invalid avatar URLsResolvedRaymond Hoh2017-10-16

Actions
Actions

Also available in: Atom PDF