Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • EddieDemon 6 posts 76 karma points
    Aug 04, 2023 @ 11:40
    EddieDemon
    0

    v12 Add Custom Property to user

    Hi there,

    I've been searching for a while now, even here, but none of the questions get answered. Is or is it not possible to add a property to a user? If not, what would be a good workaround?

    For example, I want my LinkedIn and other socials and/or a short "about me" shown under my posts.

    Hopefully this will be seen and answered.

    Kinds regards, Eddie

  • Huw Reddick 1770 posts 6156 karma points MVP c-trib
    Aug 04, 2023 @ 15:13
    Huw Reddick
    1

    Do you mean backoffice users or frontend members?

    AFAIK backoffice users can not have custom properties.

  • EddieDemon 6 posts 76 karma points
    Aug 07, 2023 @ 13:13
    EddieDemon
    0

    Backend users.

    And what would you suggest I do?

  • Huw Reddick 1770 posts 6156 karma points MVP c-trib
    Aug 07, 2023 @ 15:14
    Huw Reddick
    100

    I'm not aware of anyway to do this.

    Why would you want to show this info to backoffice users?

  • EddieDemon 6 posts 76 karma points
    Aug 07, 2023 @ 15:31
    EddieDemon
    0

    I suppose I wasn't clear. Let me try to rephrase it.

    On the frontend there are blog posts, let's call them blogs. These blog posts are written by users (note: with this I mean the Umbraco term of an User.)

    On the blog post will be a portion of information of said user. Like their socials and biography. This specific information is often configured under said user but not for Umbraco.

    So, the question is: how to/best practice to store user specific information for use on the frontend?

  • Marc Goodson 2148 posts 14352 karma points MVP 8x c-trib
    Aug 07, 2023 @ 16:23
    Marc Goodson
    1

    Hi EddieDemon

    When I've had this scenario in the past, I've created an Author Document Type, that details the Author's name and linked in and biog, as when you think about it, it's kind of like content, just not necessarily a webpage - although often I will create an Author page template, to show the details about the Author, and list their recent blog posts.

    Then I'll add a content picker to the blog post that allows single (or sometimes multiple) authors to be picked for a blog.

    Then in the template for the blog post, I'll use this 'picked' author to retrieve the Author details to display under the Blog Post.

    If the Authors aren't going to have their own page, then I might create a section of the site called 'Library' or 'Shared Content' and have an Authors Folder and allow the creation of Authors under there, ready to be picked.

    If you are worried about Users logging in, writing some tosh and assigning it to another Author - then you could make the Author property a label and write some code using the EditorModel sending events, to find the Author that matched the current logged in User and populate it automatically... but usually it's more useful to let people pick the Author from the list, for those niche circumstances when someone is away on holiday...

    regards

    marc

Please Sign in or register to post replies

Write your reply to:

Draft