Require the profile image for users

The grey profile picture is unappealing to users scrolling the site, it makes everyone look like a bot.

Is there a way I can do any of the following:

  1. Require a profile pic before they can submit a listing
  2. Auto assign a profile pic from my selection (maybe I choose an avatar for all users to be assigned or a few avatars and they get assigned randomly)
1 Like

Hi,

Yes, please use this PHP snippet:

​I hope this is helpful to you.

1 Like

The snippet did nothing. A new user can still create an account or sign in and make a listing without a profile pic. I assume that snippet only works if a user is trying to save new profile changes and they haven’t uploaded a pic.

Instead, is there a PHP snippet that allows me to set a default profile image?

Hi,

We have additionally tested this PHP snippet and it works correctly. A user visits your website > registers > clicks the add listing button and is immediately redirected to the Complete Profile page, and until they fill in the required Image field, they will not be able to proceed to the listing form. Please make sure you add a snippet using this doc: How to add custom code snippets - HivePress Help Center. Also, please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, make sure that caching is disabled for logged-in users and refresh the permalinks: How to refresh WordPress permalinks - HivePress Help Center.

Hmm I copy and pasted the github code into the snippets plug in under Add New PHP. After saving and activating it still doesn’t work. Is there anything other than the code that I have to add? Perhaps a library or link to the github?

Hi,

Please provide more details regarding this issue (e.g., your actions step by step with screenshots, etc.). This will help us to reproduce and resolve the issue faster.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.