user attributes

Permalink Browser Info Environment
Hi Ramon,

The field type 'user' is listed in the available field types. But is it also possible to get user attributes?

I have a custom user-attribute (textfield) which i want to show in a block. I want the block to show this attribute from one of the users at random (users are in a group). Is this possible with block designer pro?

Type: Pre-Sale
Status: Resolved
View Replies:
ramonleenders replied on at Permalink Reply
Hallo Buurvrouw!

By default, you are able to choose between:

user ID (getUserID)
user name (getUserDisplayName)
user email (getUserEmail)

I could expand this with the ability to have own attributes. What are you trying to output, becuase you say "random"? What is gonna be random, the attribute, the user or...?

Kind regards,

buurvrouw replied on at Permalink Reply
Ah thanks for the quick answer!

I'm building a site where the users have their personal bio-pages (just normal site-pages). The users have several custom attributes like Full Name, Link to page, Personal Slogan attached to their user profile.

The random thing is the user. So the block takes a random user from a certain group and display's the Slogan, the Full Name, and the Link to a page, all from the filled out custom user-attributes.

Is this do-able?
ramonleenders replied on at Permalink Reply
This is pretty custom. The user field type is there to choose from all users, not a random user and a lot of custom attributes. If it's random anyways, wouldn't it be better to hardcode this into your block? I don't know any use-case for a project, so it's high unlikely that this is to be used in another project.
buurvrouw replied on at Permalink Reply
Ok, thanks for looking into this. I'll try and find another solution. Maybe i'm just ging another approach and let the users fill out a testimonial block.
Or i'll try your solution with hardcoding, but i'm not much of a coder.

Anyway, thanks for pointing me the right direction.

ramonleenders replied on at Permalink Reply
You can always drop me a message, the thing you're asking for shouldn't be that hard to code. It's a random user and some attributes, so nothing special. User action is not needed, as you do pick the user at random!

concrete5 Environment Information


Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.