Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
public function mo_ci_sync_existing_user($TH, $Ek, $XE, $errors) { $cO = arr..
Decoded Output download
<? public function mo_ci_sync_existing_user($TH, $Ek, $XE, $errors)
{
$cO = array();
$Hm = get_user_meta($TH->ID);
if (empty($XE)) {
goto d4;
}
foreach ($Hm as $yo => $Ya) {
if (!array_key_exists($yo, $XE)) {
goto lt;
}
$sp = array();
$sp["Name"] = $XE[$yo];
$sp["Value"] = $Ya[0];
array_push($cO, $sp);
lt:
wv:
}
Mh:
d4:
$Bj = $TH->data->user_email;
$Tb = ["UserAttributes" => [["Name" => "email", "Value" => $TH->data->user_email], ["Name" => "name", "Value" => $TH->data->display_name], ["Name" => "email_verified", "Value" => "true"]], "MessageAction" => "SUPPRESS", "Username" => $Bj, "UserPoolId" => $Ek];
try {
$user = $this->client->adminCreateUser($Tb);
$user = $this->client->adminUpdateUserAttributes(["UserAttributes" => $cO, "UserPoolId" => $Ek, "Username" => $TH->data->user_email]);
$Tb = ["Password" => "miniOrange@123", "Permanent" => false, "Username" => $TH->data->user_email, "UserPoolId" => $Ek];
$this->client->adminSetUserPassword($Tb);
do_action("mo_ci_cognito_signup_user", $user);
} catch (Exception $gQ) {
if (method_exists($gQ, "getAwsErrorMessage")) {
goto pZ;
}
$errors["mo_cognito_error"] = $gQ->getMessage();
goto NH;
pZ:
$errors["mo_cognito_error"] = $gQ->getAwsErrorMessage();
NH:
}
return $errors;
}
public function mo_ci_update_user($TH, $errors)
{
$s7 = $this->mc_util->get_app_list();
foreach ($s7 as $jr => $qf) {
$nC = $this->mc_util->get_app_by_name($jr);
$CR = $nC->get_app_config();
if (!($CR["appId"] == "cognitointegrator")) {
goto yZ;
}
goto Eq;
yZ:
lQ:
}
Eq:
if (!$nC) {
goto oK;
}
$GZ = $nC->get_app_config();
$mP = $GZ["mo_ci_client_id"];
$rI = $GZ["mo_ci_client_secret"];
$Wo = $TH["user_email"];
if ($Wo) {
goto Lz;
}
wp_die("Username for new user not recieved.");
exit;
Lz:
$Hm = get_user_meta($TH["ID"]);
$cO = array();
$Ii = hash_hmac("sha256", $Wo . $mP, $rI, true);
if (empty($Hm)) {
goto WA;
}
if (empty($GZ["custom_attrs_mapping"])) {
goto h2;
}
$XE = $GZ["custom_attrs_mapping"];
foreach ($Hm as $yo => $Ya) {
if (!array_key_exists($yo, $XE)) {
goto TH;
}
$sp = array();
$sp["Name"] = $XE[$yo];
$sp["Value"] = strval($Ya[0]);
array_push($cO, $sp);
TH:
RW:
}
C8:
h2:
WA:
$Tb = ["ClientId" => $mP, "Password" => $TH["password"], "SecretHash" => base64_encode($Ii), "UserAttributes" => [["Name" => "email", "Value" => $TH["email"]]], "Username" => $Wo];
MO_Oauth_Debug::mo_oauth_log($Wo);
MO_Oauth_Debug::mo_oauth_log($cO);
try {
$user = $this->client->adminUpdateUserAttributes(["UserAttributes" => $cO, "UserPoolId" => $GZ["mo_ci_pool_id"], "Username" => "{$Wo}"]);
} catch (Exception $gQ) {
if (method_exists($gQ, "getAwsErrorMessage")) {
goto hZ;
}
$errors["mo_cognito_error"] = $gQ->getMessage();
goto Pf;
hZ:
$errors["mo_cognito_error"] = $gQ->getAwsErrorMessage();
Pf:
}
oK:
return $errors;
} ?>
Did this file decode correctly?
Original Code
public function mo_ci_sync_existing_user($TH, $Ek, $XE, $errors)
{
$cO = array();
$Hm = get_user_meta($TH->ID);
if (empty($XE)) {
goto d4;
}
foreach ($Hm as $yo => $Ya) {
if (!array_key_exists($yo, $XE)) {
goto lt;
}
$sp = array();
$sp["\116\x61\x6d\145"] = $XE[$yo];
$sp["\126\141\154\x75\x65"] = $Ya[0];
array_push($cO, $sp);
lt:
wv:
}
Mh:
d4:
$Bj = $TH->data->user_email;
$Tb = ["\125\163\x65\162\x41\x74\x74\x72\x69\x62\165\x74\x65\163" => [["\x4e\x61\x6d\x65" => "\145\155\x61\151\154", "\x56\x61\x6c\165\145" => $TH->data->user_email], ["\116\141\155\x65" => "\156\x61\155\x65", "\x56\141\154\165\x65" => $TH->data->display_name], ["\116\x61\155\145" => "\145\155\141\x69\x6c\137\x76\x65\162\x69\146\151\x65\144", "\126\x61\x6c\165\145" => "\x74\x72\x75\x65"]], "\x4d\x65\x73\x73\141\x67\145\x41\x63\164\151\x6f\x6e" => "\123\x55\x50\120\122\105\123\x53", "\125\x73\145\162\x6e\x61\155\x65" => $Bj, "\x55\163\x65\162\120\157\x6f\154\x49\x64" => $Ek];
try {
$user = $this->client->adminCreateUser($Tb);
$user = $this->client->adminUpdateUserAttributes(["\x55\x73\145\162\101\x74\164\x72\151\x62\165\x74\x65\163" => $cO, "\x55\163\x65\162\120\x6f\157\x6c\x49\144" => $Ek, "\125\163\145\162\156\x61\155\x65" => $TH->data->user_email]);
$Tb = ["\120\x61\x73\x73\x77\x6f\x72\x64" => "\x6d\x69\x6e\151\x4f\x72\141\156\147\145\100\61\x32\x33", "\x50\x65\162\x6d\141\156\145\x6e\164" => false, "\125\x73\145\x72\156\141\x6d\145" => $TH->data->user_email, "\x55\163\145\162\120\x6f\x6f\x6c\111\144" => $Ek];
$this->client->adminSetUserPassword($Tb);
do_action("\155\157\137\x63\151\137\143\x6f\x67\156\151\164\157\137\x73\x69\147\156\x75\x70\137\165\163\x65\162", $user);
} catch (Exception $gQ) {
if (method_exists($gQ, "\147\x65\x74\101\x77\x73\105\x72\x72\x6f\162\115\x65\163\x73\141\x67\x65")) {
goto pZ;
}
$errors["\155\x6f\x5f\143\x6f\147\156\151\x74\x6f\x5f\145\x72\x72\x6f\x72"] = $gQ->getMessage();
goto NH;
pZ:
$errors["\155\x6f\137\143\157\x67\x6e\x69\164\x6f\137\x65\162\162\x6f\162"] = $gQ->getAwsErrorMessage();
NH:
}
return $errors;
}
public function mo_ci_update_user($TH, $errors)
{
$s7 = $this->mc_util->get_app_list();
foreach ($s7 as $jr => $qf) {
$nC = $this->mc_util->get_app_by_name($jr);
$CR = $nC->get_app_config();
if (!($CR["\141\160\x70\x49\144"] == "\x63\157\147\x6e\x69\x74\x6f\151\x6e\x74\x65\x67\x72\x61\164\157\x72")) {
goto yZ;
}
goto Eq;
yZ:
lQ:
}
Eq:
if (!$nC) {
goto oK;
}
$GZ = $nC->get_app_config();
$mP = $GZ["\155\x6f\137\143\x69\x5f\x63\154\151\145\x6e\x74\137\x69\144"];
$rI = $GZ["\x6d\157\x5f\143\x69\137\143\154\x69\x65\156\164\137\x73\x65\143\x72\x65\x74"];
$Wo = $TH["\165\163\145\x72\x5f\x65\x6d\141\x69\154"];
if ($Wo) {
goto Lz;
}
wp_die("\125\x73\145\162\x6e\141\x6d\145\x20\146\157\x72\x20\156\x65\x77\x20\x75\163\x65\162\40\x6e\157\164\40\x72\145\x63\x69\145\166\145\144\56");
exit;
Lz:
$Hm = get_user_meta($TH["\111\x44"]);
$cO = array();
$Ii = hash_hmac("\x73\x68\x61\x32\65\x36", $Wo . $mP, $rI, true);
if (empty($Hm)) {
goto WA;
}
if (empty($GZ["\143\165\163\x74\x6f\155\x5f\x61\x74\x74\162\x73\137\x6d\141\x70\160\151\x6e\x67"])) {
goto h2;
}
$XE = $GZ["\x63\165\163\x74\157\155\x5f\x61\x74\x74\x72\x73\137\155\x61\160\x70\x69\156\147"];
foreach ($Hm as $yo => $Ya) {
if (!array_key_exists($yo, $XE)) {
goto TH;
}
$sp = array();
$sp["\116\141\x6d\145"] = $XE[$yo];
$sp["\126\x61\x6c\165\x65"] = strval($Ya[0]);
array_push($cO, $sp);
TH:
RW:
}
C8:
h2:
WA:
$Tb = ["\x43\154\x69\x65\x6e\164\111\144" => $mP, "\x50\141\163\163\167\157\162\144" => $TH["\x70\x61\163\163\167\x6f\162\x64"], "\x53\x65\x63\162\x65\x74\110\141\163\x68" => base64_encode($Ii), "\125\163\145\x72\101\164\x74\162\151\142\x75\164\145\x73" => [["\116\141\155\x65" => "\145\155\x61\x69\154", "\126\x61\x6c\165\x65" => $TH["\x65\155\x61\151\154"]]], "\125\x73\x65\x72\156\x61\x6d\145" => $Wo];
MO_Oauth_Debug::mo_oauth_log($Wo);
MO_Oauth_Debug::mo_oauth_log($cO);
try {
$user = $this->client->adminUpdateUserAttributes(["\125\x73\145\x72\x41\x74\164\x72\x69\x62\165\164\x65\163" => $cO, "\x55\x73\145\162\x50\x6f\x6f\154\111\x64" => $GZ["\x6d\157\x5f\143\x69\x5f\x70\x6f\x6f\x6c\137\151\144"], "\125\x73\145\162\x6e\141\x6d\x65" => "{$Wo}"]);
} catch (Exception $gQ) {
if (method_exists($gQ, "\147\x65\x74\x41\167\x73\105\162\162\157\162\x4d\145\163\x73\x61\147\x65")) {
goto hZ;
}
$errors["\155\157\x5f\143\157\x67\x6e\151\164\157\x5f\145\x72\x72\157\162"] = $gQ->getMessage();
goto Pf;
hZ:
$errors["\155\x6f\x5f\143\157\x67\156\x69\x74\157\137\145\162\162\x6f\162"] = $gQ->getAwsErrorMessage();
Pf:
}
oK:
return $errors;
}
Function Calls
None |
Stats
MD5 | d49b22a571a66eab95911957648713e6 |
Eval Count | 0 |
Decode Time | 43 ms |