@@ 110-123 (lines=14) @@ | ||
107 | } |
|
108 | } |
|
109 | ||
110 | if(!function_exists('restoreSettings')) { |
|
111 | /** |
|
112 | * @param array $settings |
|
113 | */ |
|
114 | function restoreSettings($settings) |
|
115 | { |
|
116 | $modx = evolutionCMS(); |
|
117 | $tbl_system_settings = $modx->getDatabase()->getFullTableName('system_settings'); |
|
118 | ||
119 | foreach ($settings as $k => $v) { |
|
120 | $modx->getDatabase()->update(array('setting_value' => $v), $tbl_system_settings, "setting_name='{$k}'"); |
|
121 | } |
|
122 | } |
|
123 | } |
|
124 | ||
125 | if(!function_exists('parsePlaceholder')) { |
|
126 | /** |
@@ 354-371 (lines=18) @@ | ||
351 | } |
|
352 | } |
|
353 | ||
354 | if(!function_exists('updateNewHash')) { |
|
355 | /** |
|
356 | * @param string $username |
|
357 | * @param string $password |
|
358 | */ |
|
359 | function updateNewHash($username, $password) |
|
360 | { |
|
361 | $modx = evolutionCMS(); |
|
362 | ||
363 | $field = array(); |
|
364 | $field['password'] = $modx->getPasswordHash()->HashPassword($password); |
|
365 | $modx->getDatabase()->update( |
|
366 | $field, |
|
367 | $modx->getDatabase()->getFullTableName('manager_users'), |
|
368 | "username='{$username}'" |
|
369 | ); |
|
370 | } |
|
371 | } |
|
372 | ||
373 | if(!function_exists('incrementFailedLoginCount')) { |
|
374 | /** |