dbxapp 4.1.3
CMS, Shop, Workflows und modulare Geschäftsanwendungen
Loading...
Searching...
No Matches
dbxUser_password_change_test.php File Reference

Go to the source code of this file.

Variables

const dbxSystem 'dbxWebApp'
const dbxRunAsAdmin 1
 $class = new ReflectionClass('dbx\\dbxAdmin\\dbxUser')
 $user = $class->newInstanceWithoutConstructor()
 $validate = $class->getMethod('validate_password_change')
 $texts
 $cases
foreach($cases as $index=> $case) $settingsAfterChange = $class->getMethod('settings_after_password_change')
 $changedSettings
if(!is_array($changedSettings)||isset($changedSettings['password_reset_required'])||($changedSettings['dashboard_layout'] ?? '') !=='compact'||empty($changedSettings['password_changed_at'])) $template = file_get_contents(dirname(__DIR__) . '/tpl/htm/form-admin-user.htm')
 $profilePos = strpos((string)$template, '>Profil<')
 $passwordPos = strpos((string)$template, '{obj:password_new}')
 $repeatPos = strpos((string)$template, '{obj:password_new2}')
 $contactPos = strpos((string)$template, '>Kontakt<')
if( $profilePos===false||$passwordPos===false||$repeatPos===false||$contactPos===false||!( $profilePos< $passwordPos &&$passwordPos< $repeatPos &&$repeatPos< $contactPos)||substr_count((string) $template, '{obj:password_new}') !==1||substr_count((string) $template, '{obj:password_new2}') !==1) if(strpos((string) $template, '{obj:settings_view}')===false||strpos((string) $template, '{obj:settings}') !==false $settingsView ) = $class->getMethod('user_settings_view')
 $settingsHtml
 if (strpos( $settingsHtml, 'Bestätigungslink abgelaufen')===false||strpos( $settingsHtml, 'Passwortwechsel erforderlich')===false||strpos( $settingsHtml, 'Theme')===false||strpos( $settingsHtml, 'dunkel')===false||strpos( $settingsHtml, 'DARF-NICHT-SICHTBAR-SEIN') !==false||strpos( $settingsHtml, 'DARF-AUCH-NICHT-SICHTBAR-SEIN') !==false)

Variable Documentation

◆ $cases

$cases
Initial value:
= array(
array(false, '', '', false, '', ''),
array(true, '', '', false, 'password_new', 'Bitte ein neues Passwort eingeben.'),
array(false, 'abcdef', '', false, 'password_new2', 'Bitte das neue Passwort wiederholen.'),
array(false, 'abcdef', 'abcdeg', false, 'password_new2', 'Die Passwoerter stimmen nicht ueberein.'),
array(false, 'abc', 'abc', false, 'password_new', 'Das Passwort muss mindestens 6 Zeichen lang sein.'),
array(false, 'Sicher-123', 'Sicher-123', true, '', ''),
array(true, 'Sicher-123', 'Sicher-123', true, '', ''),
)

Definition at line 50 of file dbxUser_password_change_test.php.

◆ $changedSettings

$changedSettings
Initial value:
= json_decode(
json_encode(array(
'password_reset_required' => 1,
'dashboard_layout' => 'compact',
))
),
true
)
foreach($cases as $index=> $case) $settingsAfterChange

Definition at line 72 of file dbxUser_password_change_test.php.

◆ $class

$class = new ReflectionClass('dbx\\dbxAdmin\\dbxUser')

Definition at line 10 of file dbxUser_password_change_test.php.

◆ $contactPos

$contactPos = strpos((string)$template, '>Kontakt<')

Definition at line 94 of file dbxUser_password_change_test.php.

◆ $passwordPos

$passwordPos = strpos((string)$template, '{obj:password_new}')

Definition at line 92 of file dbxUser_password_change_test.php.

◆ $profilePos

$profilePos = strpos((string)$template, '>Profil<')

Definition at line 91 of file dbxUser_password_change_test.php.

◆ $repeatPos

$repeatPos = strpos((string)$template, '{obj:password_new2}')

Definition at line 93 of file dbxUser_password_change_test.php.

◆ $settingsAfterChange

foreach ( $cases as $index=> $case) $settingsAfterChange = $class->getMethod('settings_after_password_change')

Definition at line 71 of file dbxUser_password_change_test.php.

◆ $settingsHtml

$settingsHtml
Initial value:
= $settingsView->invoke($user, array(
'is_confirm' => 0,
'settings' => json_encode(array(
'register_confirm' => array(
'token_hash' => 'DARF-NICHT-SICHTBAR-SEIN',
'expires' => time() - 60,
'sent' => '2026-05-29 17:10:56',
),
'password_reset_required' => 1,
'theme' => 'dunkel',
'api_secret' => 'DARF-AUCH-NICHT-SICHTBAR-SEIN',
)),
), $texts)
if( $profilePos===false||$passwordPos===false||$repeatPos===false||$contactPos===false||!( $profilePos< $passwordPos &&$passwordPos< $repeatPos &&$repeatPos< $contactPos)||substr_count((string) $template, '{obj:password_new}') !==1||substr_count((string) $template, '{obj:password_new2}') !==1) if(strpos((string) $template, '{obj:settings_view}')===false||strpos((string) $template, '{obj:settings}') !==false $settingsView)

Definition at line 110 of file dbxUser_password_change_test.php.

◆ $settingsView

if($profilePos===false|| $passwordPos===false|| $repeatPos===false|| $contactPos===false||!($profilePos< $passwordPos && $passwordPos< $repeatPos && $repeatPos< $contactPos)||substr_count((string) $template, '{obj:password_new}') !==1||substr_count((string) $template, '{obj:password_new2}') !==1) if (strpos((string) $template, '{obj:settings_view}')===false||strpos((string) $template, '{obj:settings}') !==false $settingsView) = $class->getMethod('user_settings_view')

Definition at line 109 of file dbxUser_password_change_test.php.

◆ $template

if (!is_array( $changedSettings)||isset( $changedSettings[ 'password_reset_required'])||( $changedSettings[ 'dashboard_layout'] ?? '') !=='compact'||empty( $changedSettings[ 'password_changed_at'])) $template = file_get_contents(dirname(__DIR__) . '/tpl/htm/form-admin-user.htm')

Definition at line 90 of file dbxUser_password_change_test.php.

◆ $texts

◆ $user

$user = $class->newInstanceWithoutConstructor()

Definition at line 11 of file dbxUser_password_change_test.php.

◆ $validate

$validate = $class->getMethod('validate_password_change')

Definition at line 12 of file dbxUser_password_change_test.php.

Referenced by dbxReport\get_sys().

◆ dbxRunAsAdmin

const dbxRunAsAdmin 1

Definition at line 4 of file dbxUser_password_change_test.php.

◆ dbxSystem

const dbxSystem 'dbxWebApp'

Definition at line 3 of file dbxUser_password_change_test.php.

◆ if

if(strpos($settingsHtml, 'Bestätigungslink abgelaufen')===false||strpos($settingsHtml, 'Passwortwechsel erforderlich')===false||strpos($settingsHtml, 'Theme')===false||strpos($settingsHtml, 'dunkel')===false||strpos($settingsHtml, 'DARF-NICHT-SICHTBAR-SEIN') !==false||strpos($settingsHtml, 'DARF-AUCH-NICHT-SICHTBAR-SEIN') !==false) ( strpos( $settingsHtml, 'Bestätigungslink abgelaufen') = == false || strpos($settingsHtml, 'Passwortwechsel erforderlich') === false || strpos($settingsHtml, 'Theme') === false || strpos($settingsHtml, 'dunkel') === false || strpos($settingsHtml, 'DARF-NICHT-SICHTBAR-SEIN') !== false || strpos($settingsHtml, 'DARF-AUCH-NICHT-SICHTBAR-SEIN') !== false)

Definition at line 123 of file dbxUser_password_change_test.php.