Bootstrap 5 continued + bugfixes
This commit is contained in:
@ -29,14 +29,14 @@ class Register extends Controller {
|
||||
public function confirm( $code = null ) {
|
||||
self::$title = 'Confirm Email';
|
||||
if ( !isset( $code ) && !Input::exists( 'confirmationCode' ) ) {
|
||||
return Views::view( 'email.confirmation' );
|
||||
return Views::view( 'confirmation' );
|
||||
}
|
||||
if ( Forms::check( 'emailConfirmation' ) ) {
|
||||
$code = Input::post( 'confirmationCode' );
|
||||
}
|
||||
if ( !self::$user->confirm( $code ) ) {
|
||||
Issues::add( 'error', 'There was an error confirming your account, please try again.' );
|
||||
return Views::view( 'email.confirmation' );
|
||||
return Views::view( 'confirmation' );
|
||||
}
|
||||
Session::flash( 'success', 'You have successfully confirmed your email address.' );
|
||||
Redirect::to( 'home/index' );
|
||||
@ -97,13 +97,13 @@ class Register extends Controller {
|
||||
if ( !App::$isLoggedIn ) {
|
||||
return Issues::add( 'notice', 'Please log in to resend your confirmation email.' );
|
||||
}
|
||||
if ( App::$activeUser->data()->confirmed == '1' ) {
|
||||
if ( App::$activeUser->confirmed == '1' ) {
|
||||
return Issues::add( 'notice', 'Your account has already been confirmed.' );
|
||||
}
|
||||
if ( !Forms::check( 'confirmationResend' ) ) {
|
||||
return Views::view( 'email.confirmation_resend' );
|
||||
return Views::view( 'confirmation_resend' );
|
||||
}
|
||||
Email::send( App::$activeUser->data()->email, 'confirmation', App::$activeUser->data()->confirmationCode, [ 'template' => true ] );
|
||||
Email::send( App::$activeUser->email, 'confirmation', App::$activeUser->confirmationCode, [ 'template' => true ] );
|
||||
Session::flash( 'success', 'Your confirmation email has been sent to the email for your account.' );
|
||||
Redirect::to( 'home/index' );
|
||||
}
|
||||
@ -111,26 +111,26 @@ class Register extends Controller {
|
||||
public function reset( $code = null ) {
|
||||
self::$title = 'Password Reset';
|
||||
if ( !isset( $code ) && !Input::exists( 'resetCode' ) ) {
|
||||
Issues::add( 'error', 'No reset code provided.' );
|
||||
Issues::add( 'info', 'Please provide a reset code.' );
|
||||
return Views::view( 'password_reset_code' );
|
||||
}
|
||||
if ( Input::exists( 'resetCode' ) ) {
|
||||
if ( Forms::check( 'password_reset_code' ) ) {
|
||||
if ( Forms::check( 'passwordResetCode' ) ) {
|
||||
$code = Input::post( 'resetCode' );
|
||||
}
|
||||
}
|
||||
if ( !self::$user->checkCode( $code ) ) {
|
||||
if ( ! self::$user->checkCode( $code ) ) {
|
||||
Issues::add( 'error', 'There was an error with your reset code. Please try again.' );
|
||||
return Views::view( 'password_reset_code' );
|
||||
}
|
||||
if ( !Input::exists() ) {
|
||||
Components::set( 'resetCode', $code );
|
||||
if ( ! Input::exists('password') ) {
|
||||
return Views::view( 'password_reset' );
|
||||
}
|
||||
if ( !Forms::check( 'passwordReset' ) ) {
|
||||
if ( ! Forms::check( 'passwordReset' ) ) {
|
||||
Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] );
|
||||
return Views::view( 'password_reset' );
|
||||
}
|
||||
Components::set( 'resetCode', $code );
|
||||
self::$user->changePassword( $code, Input::post( 'password' ) );
|
||||
Email::send( self::$user->data()->email, 'passwordChange', null, [ 'template' => true ] );
|
||||
Session::flash( 'success', 'Your Password has been changed, please use your new password to log in.' );
|
||||
|
@ -43,7 +43,7 @@ class Usercp extends Controller {
|
||||
public function email() {
|
||||
self::$title = 'Email Settings';
|
||||
if ( App::$activeUser->confirmed != '1' ) {
|
||||
return Issues::add( 'notice', 'You need to confirm your email address before you can make modifications. If you would like to resend that confirmation link, please <a href="{BASE}register/resend">click here</a>', true );
|
||||
return Issues::add( 'notice', 'You need to confirm your email address before you can make modifications. If you would like to resend that confirmation link, please <a href="/register/resend">click here</a>', true );
|
||||
}
|
||||
if ( !Input::exists() ) {
|
||||
return Views::view( 'user_cp.email_change' );
|
||||
@ -98,6 +98,7 @@ class Usercp extends Controller {
|
||||
$fields = App::$activePrefs;
|
||||
if ( Input::exists( 'submit' ) ) {
|
||||
$fields = $prefs->convertFormToArray( true, false );
|
||||
// dv( $fields );
|
||||
// @TODO now i may need to rework the form checker to work with this....
|
||||
// if (!Forms::check('userPrefs')) {
|
||||
// Issues::add( 'error', [ 'There was an error with your request.' => Check::userErrors() ] );
|
||||
|
Reference in New Issue
Block a user