Bootstrap 5 continued + bugfixes
This commit is contained in:
@ -214,6 +214,10 @@ class Forms extends Check {
|
||||
* @return {bool}
|
||||
*/
|
||||
public static function passwordResetCode() {
|
||||
if ( !Input::exists( 'resetCode' ) ) {
|
||||
self::addUserError( 'Invalid resetCode.' );
|
||||
return false;
|
||||
}
|
||||
if ( !self::token() ) {
|
||||
return false;
|
||||
}
|
||||
|
@ -212,12 +212,13 @@ class Preferences {
|
||||
}
|
||||
if ( 'file' == $details['type'] ) {
|
||||
if ( Input::exists( $name ) ) {
|
||||
$folder = IMAGE_UPLOAD_DIRECTORY . App::$activeUser->username . DIRECTORY_SEPARATOR;
|
||||
if ( !Upload::image( $name, $folder ) ) {
|
||||
Issues::add( 'error', [ 'There was an error with your upload.' => Check::systemErrors() ] );
|
||||
} else {
|
||||
$folder = UPLOAD_DIRECTORY . App::$activeUser->username . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR;
|
||||
$upload = Upload::image( $name, $folder );
|
||||
if ( $upload ) {
|
||||
$route = str_replace( APP_ROOT_DIRECTORY, '', $folder );
|
||||
$prefsArray[$name] = $route . Upload::last();
|
||||
} else {
|
||||
Issues::add( 'error', [ 'There was an error with your upload.' => Check::userErrors() ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user