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

Support for anonymous users #30

Open
eelkeblok opened this Issue Jul 17, 2016 · 11 comments

Comments

Projects
None yet
3 participants
@eelkeblok

eelkeblok commented Jul 17, 2016

What would be involved to be able to support anonymous users? If I understand the architecture correctly, the module essentially auto-populates the user picture field on registered users, which I suppose complicates giving anonymous users an avatar. However, arguably, the appeal of services like Gravatar is that you can have your personalized avatar on sites even if you don't have a registered user account.

@dpi

This comment has been minimized.

Show comment
Hide comment
@dpi

dpi Jul 17, 2016

Owner

Normally the picture field is filled with a picture for each user, but this can be a problem since anonymous aren't 100% users. The anonymous user also represents more than one person.

As an alternative, you can upload a picture to be the default image. But this picture will not vary per piece of anonymous submitted content.

I'm sure there's ways to do this, but I have not accounted for this scenario. Im open for ideas or contributions.

Owner

dpi commented Jul 17, 2016

Normally the picture field is filled with a picture for each user, but this can be a problem since anonymous aren't 100% users. The anonymous user also represents more than one person.

As an alternative, you can upload a picture to be the default image. But this picture will not vary per piece of anonymous submitted content.

I'm sure there's ways to do this, but I have not accounted for this scenario. Im open for ideas or contributions.

@dpi

This comment has been minimized.

Show comment
Hide comment
@dpi

dpi Jul 22, 2016

Owner

Task up for grabs:

Identify where anonymous users can post content, and where their pictures would be exposed. Including Drupal core and major module projects.

Owner

dpi commented Jul 22, 2016

Task up for grabs:

Identify where anonymous users can post content, and where their pictures would be exposed. Including Drupal core and major module projects.

@eelkeblok

This comment has been minimized.

Show comment
Hide comment
@eelkeblok

eelkeblok Jul 24, 2016

I'm thinking it maybe should be possible to do some preprocessing while rendering an anonymous user. This should go a long way in supporting most scenario's, provided that the user is rendered in a standard way. I was some way into trying to implement this, unfortunately, I don't have much time to work on this project.

eelkeblok commented Jul 24, 2016

I'm thinking it maybe should be possible to do some preprocessing while rendering an anonymous user. This should go a long way in supporting most scenario's, provided that the user is rendered in a standard way. I was some way into trying to implement this, unfortunately, I don't have much time to work on this project.

@eelkeblok

This comment has been minimized.

Show comment
Hide comment
@eelkeblok

eelkeblok Jul 24, 2016

Having had a look at my code again, I realise that comments is one of the few places this is possible at all (and is what I'm interested in), because these can be configured for anonymous users to leave their email address. Without that, it would be hard to add any meaningful anonymous avatar.

eelkeblok commented Jul 24, 2016

Having had a look at my code again, I realise that comments is one of the few places this is possible at all (and is what I'm interested in), because these can be configured for anonymous users to leave their email address. Without that, it would be hard to add any meaningful anonymous avatar.

@eelkeblok

This comment has been minimized.

Show comment
Hide comment
@eelkeblok

eelkeblok Jul 24, 2016

I am wondering now whether it would make sense to change the way to display avatars altogether to a pseudo field. The module is currently based on a picture field that is being populated by the module. What if the module instead offered a pseudo field that determined the image to render dynamically whenever it needed rendering? This would be a great way to break into the anonymous user rendering. It should support any sort of image rendering a regular image field would also support (I am not sure how much of a challenge that is). I think that would also be cleaner than requiring two image fields on the user profile; one for supporting image upload and one for the module to populate based on its business logic.

eelkeblok commented Jul 24, 2016

I am wondering now whether it would make sense to change the way to display avatars altogether to a pseudo field. The module is currently based on a picture field that is being populated by the module. What if the module instead offered a pseudo field that determined the image to render dynamically whenever it needed rendering? This would be a great way to break into the anonymous user rendering. It should support any sort of image rendering a regular image field would also support (I am not sure how much of a challenge that is). I think that would also be cleaner than requiring two image fields on the user profile; one for supporting image upload and one for the module to populate based on its business logic.

@dpi

This comment has been minimized.

Show comment
Hide comment
Owner

dpi commented Jan 18, 2017

@dpi

This comment has been minimized.

Show comment
Hide comment
@dpi

dpi Jan 18, 2017

Owner

Relevant to this issue: Unify anonymous and registered users (and related issues)

Owner

dpi commented Jan 18, 2017

Relevant to this issue: Unify anonymous and registered users (and related issues)

@ao2

This comment has been minimized.

Show comment
Hide comment
@ao2

ao2 Dec 5, 2017

This is a show-stopper for me. On my D6 site gravatar was only used to show a picture for unauthenticated comments but it looks like this is still not possible in D8 with this module.

Since, in my case, unauthenticated users must leave the email address when they leave a comment maybe a solution can still be found using some service from the avatars module but I haven't experimented with that yet. Maybe something at the theme layer?

Do you think it would be possible to use a theme preprocess function and populate user_picture there using the avatar generator and the commenter email address? Has anyone done something like that already?

Thanks,
Antonio

ao2 commented Dec 5, 2017

This is a show-stopper for me. On my D6 site gravatar was only used to show a picture for unauthenticated comments but it looks like this is still not possible in D8 with this module.

Since, in my case, unauthenticated users must leave the email address when they leave a comment maybe a solution can still be found using some service from the avatars module but I haven't experimented with that yet. Maybe something at the theme layer?

Do you think it would be possible to use a theme preprocess function and populate user_picture there using the avatar generator and the commenter email address? Has anyone done something like that already?

Thanks,
Antonio

@eelkeblok

This comment has been minimized.

Show comment
Hide comment
@eelkeblok

eelkeblok Dec 5, 2017

For my own websites I indeed solved the entire problem in the theme layer. Sorry, I don't remember details, but I believe turning an email-adress into a gravatar URL is as simple as md5-ing the address, or something (details may be found in the gravatar developer docs). This simple approach wil of course only work if you only need support for anonymous users; as soon as you also need to support a user picture uploaded to your own site things will become more complicated and a single point of entry would be very welcome.

eelkeblok commented Dec 5, 2017

For my own websites I indeed solved the entire problem in the theme layer. Sorry, I don't remember details, but I believe turning an email-adress into a gravatar URL is as simple as md5-ing the address, or something (details may be found in the gravatar developer docs). This simple approach wil of course only work if you only need support for anonymous users; as soon as you also need to support a user picture uploaded to your own site things will become more complicated and a single point of entry would be very welcome.

@dpi

This comment has been minimized.

Show comment
Hide comment
@dpi

dpi Feb 6, 2018

Owner

Ive released a module which will be required for sites to support avatars for anonymously posted comments with Avatar Kit 2.0: Anonymous Comment User Info

Owner

dpi commented Feb 6, 2018

Ive released a module which will be required for sites to support avatars for anonymously posted comments with Avatar Kit 2.0: Anonymous Comment User Info

@ao2

This comment has been minimized.

Show comment
Hide comment
@ao2

ao2 Feb 20, 2018

Thanks @dpi.

I am not sure when I'll get the chance to try it out, but as soon as I do I'll provide some feedback here.

ao2 commented Feb 20, 2018

Thanks @dpi.

I am not sure when I'll get the chance to try it out, but as soon as I do I'll provide some feedback here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment