Skip to content
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

praxisdigital/moodle-opgaver#528 - Made user profile fields show up no matter field implementation #229

Open
wants to merge 1 commit into
base: MOODLE_404_STABLE
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions classes/steps/lookups/user_lookup_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function execute($step, $trigger, $event, $stepresults) {
$stepresults[$this->outputprefix . 'fullname'] = fullname($userdata);

// Get custom profile_fields if any.
profile_load_custom_fields($userdata);
$userdata->profile = (array)profile_user_record($userdata->id, false);
if (!empty($userdata->profile)) {
foreach ($userdata->profile as $shortname => $value) {
$stepresults[$this->outputprefix . $shortname] = $value;
Expand Down Expand Up @@ -214,7 +214,7 @@ public static function get_privacyfields() {
* @return array $stepfields The fields this step provides.
*/
public static function get_fields() {
$customfields = profile_get_custom_fields(true);
$customfields = profile_get_custom_fields();
$customfieldoptions = array_column($customfields, 'shortname', 'shortname');

return self::$stepfields + $customfieldoptions;
Expand Down