// update password hash
if ($newUserID) {
$password = 'joomla3:' . $row['password'];
- if (StringUtil::startsWith($row['password'], '$1')) {
+ if (\str_starts_with($row['password'], '$1')) {
$password = 'cryptMD5:' . $row['password'];
- } elseif (StringUtil::startsWith($row['password'], '$2')) {
+ } elseif (\str_starts_with($row['password'], '$2')) {
$password = 'Bcrypt:' . $row['password'];
- } elseif (StringUtil::startsWith($row['password'], '$P')) {
+ } elseif (\str_starts_with($row['password'], '$P')) {
$password = 'phpass:' . $row['password'];
}
) {
if ($this->readOption('attachfile') != self::ATTACHFILE_DATABASE) {
$path = $this->readOption('attachpath');
- if (!StringUtil::startsWith($path, '/')) {
+ if (!\str_starts_with($path, '/')) {
$path = \realpath($this->fileSystemPath . $path);
}
if (!\is_dir($path)) {
if (\in_array('com.woltlab.wcf.user.avatar', $this->selectedData)) {
if ($this->readOption('usefileavatar')) {
$path = $this->readOption('avatarpath');
- if (!StringUtil::startsWith($path, '/')) {
+ if (!\str_starts_with($path, '/')) {
$path = \realpath($this->fileSystemPath . $path);
}
if (!\is_dir($path)) {
try {
if ($this->readOption('usefileavatar')) {
$file = $this->readOption('avatarpath');
- if (!StringUtil::startsWith($file, '/')) {
+ if (!\str_starts_with($file, '/')) {
$file = \realpath($this->fileSystemPath . $file);
}
$file = FileUtil::addTrailingSlash($file) . 'avatar' . $row['userid'] . '_' . $row['avatarrevision'] . '.gif';
break;
case self::ATTACHFILE_FILESYSTEM:
$file = $this->readOption('attachpath');
- if (!StringUtil::startsWith($file, '/')) {
+ if (!\str_starts_with($file, '/')) {
$file = \realpath($this->fileSystemPath . $file);
}
$file = FileUtil::addTrailingSlash($file);
break;
case self::ATTACHFILE_FILESYSTEM_SUBFOLDER:
$file = $this->readOption('attachpath');
- if (!StringUtil::startsWith($file, '/')) {
+ if (!\str_starts_with($file, '/')) {
$file = \realpath($this->fileSystemPath . $file);
}
$file = FileUtil::addTrailingSlash($file);
case self::GALLERY_FILESYSTEM:
case self::GALLERY_FILESYSTEM_DIRECT_THUMBS:
$file = $this->readOption('album_picpath');
- if (!StringUtil::startsWith($file, '/')) {
+ if (!\str_starts_with($file, '/')) {
$file = \realpath($this->fileSystemPath . $file);
}
$file = FileUtil::addTrailingSlash($file);
break;
case self::ATTACHFILE_FILESYSTEM:
$file = $this->readOption('attachpath');
- if (!StringUtil::startsWith($file, '/')) {
+ if (!\str_starts_with($file, '/')) {
$file = \realpath($this->fileSystemPath . $file);
}
$file = FileUtil::addTrailingSlash($file);
break;
case self::ATTACHFILE_FILESYSTEM_SUBFOLDER:
$file = $this->readOption('attachpath');
- if (!StringUtil::startsWith($file, '/')) {
+ if (!\str_starts_with($file, '/')) {
$file = \realpath($this->fileSystemPath . $file);
}
$file = FileUtil::addTrailingSlash($file);
// update password hash
if ($newUserID) {
- if (StringUtil::startsWith($row['scheme'], 'blowfish')) {
+ if (\str_starts_with($row['scheme'], 'blowfish')) {
$password = 'Bcrypt:' . $row['token'];
- } elseif (StringUtil::startsWith($row['scheme'], 'argon2')) {
+ } elseif (\str_starts_with($row['scheme'], 'argon2')) {
$password = 'argon2:' . $row['token'];
} elseif ($row['scheme'] == 'legacy') {
$password = 'vb5:' . \implode(':', \explode(' ', $row['token'], 2));
// TODO: not yet supported
if (false && $this->readOption('usefileavatar')) {
$file = $this->readOption('avatarpath');
- if (!StringUtil::startsWith($file, '/')) {
+ if (!\str_starts_with($file, '/')) {
$file = \realpath($this->fileSystemPath . $file);
}
$file = FileUtil::addTrailingSlash($file) . 'avatar' . $row['userid'] . '_' . $row['avatarrevision'] . '.gif';