Skip to content

Commit 0c880cf

Browse files
authored
Added password change
1 parent e9e5e5e commit 0c880cf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Registries/GrEpp.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ public function login($params = array())
152152
$to[] = htmlspecialchars($params['clID']);
153153
$from[] = '/{{ pwd }}/';
154154
$to[] = htmlspecialchars($params['pw']);
155+
if (isset($params['newpw']) && !empty($params['newpw'])) {
156+
$from[] = '/{{ newpw }}/';
157+
$to[] = PHP_EOL . ' <newPW>' . htmlspecialchars($params['newpw']) . '</newPW>';
158+
} else {
159+
$from[] = '/{{ newpw }}/';
160+
$to[] = '';
161+
}
155162
$from[] = '/{{ clTRID }}/';
156163
$microtime = str_replace('.', '', round(microtime(1), 3));
157164
$to[] = htmlspecialchars($params['prefix'] . '-login-' . $microtime);
@@ -162,7 +169,7 @@ public function login($params = array())
162169
<command>
163170
<login>
164171
<clID>{{ clID }}</clID>
165-
<pw>{{ pwd }}</pw>
172+
<pw>{{ pwd }}</pw>{{ newpw }}
166173
<options>
167174
<version>1.0</version>
168175
<lang>en</lang>

0 commit comments

Comments
 (0)