Project

General

Profile

Actions

Feature proposal #7824

closed

Implement support for substitution user attribute to be a field

Added by krileon about 4 years ago. Updated about 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
Start date:
27 January 2020
Due date:
% Done:

100%

Estimated time:

Description

Currently the user attribute in substitutions can be a user id, #me, #displayed, #displayedOrMe. Implement support for supplying a field name. Example as follows.

[cb:userfield field="avatar" user="cb_mentor" /]

https://www.joomlapolis.com/forum/153-professional-member-support/241916-updating-fields-in-database-row?start=12

Actions #1

Updated by krileon about 4 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Implemented in MR !1524

Actions #2

Updated by beat about 4 years ago

This feature is interesting when used with a field that is not in the control of the regular users.

Thus the syntax should reflect that danger of getting a field from any user by changing the field from another user should be clearly understandable in the syntax:
But To me, the syntax looks like a username, and not like a field name.

A more explicit syntax, like this one, would imho be safer (open to other suggestions of course):

[cb:userfield field="avatar" user="#fromFIeld" useridfromuserfield="cb_mentor" /]
Actions #3

Updated by krileon about 4 years ago

  • Status changed from Resolved to Rejected
  • Target version deleted (CB 2.4.4)

Discussed internally that a better approach would be safe nesting of substitutions to give greater control and usability outside of just the user attribute. See #7828

Actions

Also available in: Atom PDF