Viewing 9 replies - 1 through 9 (of 9 total)
  • Yes – latest update has given all my sites a critical error – which is solved by deactivating the plugin via FTP. Grateful for a fix when you able. Thank you

    [03-Aug-2023 10:49:06 UTC] PHP Fatal error: Uncaught Error: Class ‘LoginWP\Core\Admin\FuseWP’ not found in /var/www/html/wp-content/plugins/peters-login-redirect/src/core/src/Admin/RedirectionsPage.php:18
    Stack trace: 0 /var/www/html/wp-content/plugins/peters-login-redirect/src/core/src/Admin/RedirectionsPage.php(513): LoginWP\Core\Admin\RedirectionsPage->__construct() 1 /var/www/html/wp-content/plugins/peters-login-redirect/src/core/src/Admin/Admin.php(12): LoginWP\Core\Admin\RedirectionsPage::get_instance() 2 /var/www/html/wp-content/plugins/peters-login-redirect/src/core/src/Admin/Admin.php(248): LoginWP\Core\Admin\Admin->__construct() 3 /var/www/html/wp-content/plugins/peters-login-redirect/src/core/src/Core.php(39): LoginWP\Core\Admin\Admin::get_instance() 4 /var/www/html/wp-content/plugins/peters-login-redirect/src/core/src/Core.php(187): LoginWP\Core\Core->__construct() 5 /var/www/html/wp-content/plugins/peters-login-redirect/wplogin_redirect.php(25): LoginWP\Core\Core::get_instance() 6 /var/www/html/wp-settings.php(453): include_once(‘/v in /var/www/html/wp-content/plugins/peters-login-redirect/src/core/src/Admin/RedirectionsPage.php on line 18

    Using php 7.4.33

    add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );
    /**
     * Redirect user after successful login.
     *
     * @param string $redirect_to URL to redirect to.
     * @param string $request URL the user is coming from.
     * @param object $user Logged user's data.
     * @return string
     */
    function my_login_redirect( $redirect_to, $request, $user ) {
    	// is there a user to check?
    	if ( isset( $user->roles ) && is_array( $user->roles ) ) {
    		// check for admins
    		if ( in_array( 'administrator', $user->roles ) ) {
    			// redirect them to the default place
    			return $redirect_to;
    		} else {
    			return site_url( '(CHANGE THIS TO YOUR URL DESTINATION)' );
    		}
    	} else {
    		return $redirect_to;
    	}
    }

    Here’s a code snippet for login redirection if anyone needs.

    Best is to downgrade for now, because the release of 3.0.8.1 is missing the file “/src/core/src/Admin/FuseWP.php” from the latest FuseWP integration.

    You can find the older version (3.0.8.0) here at the bottom of the page:
    https://www.ads-software.com/plugins/peters-login-redirect/advanced/

    Hopefully this issue is quickly fixed in a new update.

    Plugin Author Mej de Castro

    (@mej)

    Hi Everyone,

    v3.0.8.3 should fix the issue. Apologies as the deployment got interrupted.

    Please update and let me know how it goes.

    Thanks!

    Can confirm that the new update of v3.0.8.3 fixes this issue.

    Thread Starter jimk1416

    (@jimk1416)

    Yes @mej

    3.0.8.3 looks good. Thanks for the quick response.

    Thank you @jdp2002 — I took your code and built upon it for my needs so I wouldn’t need a plugin. If it helps anyone else here’s the gist on github

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Critical Errors’ is closed to new replies.