Skip to content

Commit

Permalink
PasswordAuthenticator
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Nov 30, 2025
1 parent 24d5d20 commit 3917640
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
25 changes: 25 additions & 0 deletions app/plugins/Transmogrify/config/schema/tables.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,21 @@
"cache": ["authenticator_id"],
"addChangelog": true
},
"password_authenticators": {
"source": "cm_password_authenticators",
"displayField": "id",
"plugin": "PasswordAuthenticator",
"cache": ["authenticator_id"],
"booleans": [
"format_crypt_php",
"format_plaintext",
"format_sha1_ldap"
],
"fieldMap": {
"password_source": "source_mode"
},
"addChangelog": true
},
"__NOTES__": "DATA MIGRATIONS",
"authentication_events": {
"source": "cm_authentication_events",
Expand Down Expand Up @@ -407,6 +422,16 @@
"co_person_id": "person_id"
}
},
"passwords": {
"source": "cm_passwords",
"displayField": "id",
"plugin": "PasswordAuthenticator",
"cache": ["person_id", "password_authenticator_id"],
"fieldMap": {
"co_person_id": "person_id",
"password_type": "type"
}
},
"person_roles": {
"source": "cm_co_person_roles",
"sqlSelect": "roleSqlSelect",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ private function performFunctionMapping(array &$row, string $oldname, string $fu
}
}


/**
* Apply a default value only when the current value is strictly null.
*
Expand Down
12 changes: 7 additions & 5 deletions app/plugins/Transmogrify/src/Lib/Traits/TypeMapperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ trait TypeMapperTrait
];


/**
/**
* Map match attribute types to corresponding model names
*
* @var array<string,string>
Expand Down Expand Up @@ -201,7 +201,7 @@ protected function mapAffiliationType(array $row, ?int $coId = null): ?int
return $this->mapType(
$row,
'PersonRoles.affiliation_type',
$coId ?? $this->findCoId($row),
$coId ?? $this->findCoId($row),
$type
);
}
Expand Down Expand Up @@ -231,13 +231,13 @@ protected function mapCoIdFromApiUserId(array $row): ?int {
*/
protected function mapApiIdFromCache(array $row): ?int {
$apis = $this->cache['apis'] ?? null;

if ($apis === null) {
return null;
}

$orgIdentitySourceId = $row['org_identity_source_id'] ?? $row["external_identity_source_id"] ?? null;

if ($orgIdentitySourceId === null) {
null;
}
Expand Down Expand Up @@ -597,6 +597,7 @@ protected function mapLoginIdentifiers(array $origRow, array &$row): void {
}
}


/**
* Map name type to corresponding type ID
*
Expand Down Expand Up @@ -760,6 +761,7 @@ protected function mapPetitionStatus(array $row): ?string
};
}


/**
* Get a default Pronoun type ID
*
Expand Down

0 comments on commit 3917640

Please sign in to comment.