Comments

aron novak’s picture

Alright, this patch makes it possible. When you delete all the mappings what came from code, the mapping remains empty and you can use the Revert button to get back the unaltered mapping from the code.

aron novak’s picture

Status: Active » Needs review
alex_b’s picture

Status: Needs review » Needs work

It shouldn't be necessary to use a new variable. Why don't you do the following?

$in_variable = variable_get('openid_cp_field_map_'. $type, FALSE);
if (is_array($in_variable)) {
  $mapping = $in_variable;
  return OPENID_CP_FIELD_OVERRIDEN;
}

Patch conflicts with #439702: User Interface review I because the typo on 'overriden' was fixed.

aron novak’s picture

Status: Needs work » Needs review
StatusFileSize
new1.41 KB
aron novak’s picture

The patch in #4 is buggy. It shows "Revert" button when there is nothing to revert and says overridden when nothing has been changed compared to the mapping that defined in code.
Also the patch in #5 includes a tiny code style improvement in determining the profile type.

aron novak’s picture

The "tiny code style improvement" in #5 is not only about code style, but the problem is that the previous way was more robust because we cannot predict what kind of profile node of the current user has.

alex_b’s picture

Status: Needs review » Fixed

This is working beautifully now. Committed, thank you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.