Redirect to login

  • hi,

    is there a quick hack to redirect guest (non logged in ) user to /login?

    i did search and found some answer with modifying some core, and its over a year old, and not sure if that still relevant.


  • Admin

    Put this in your custom js section in your ACP

    $(window).on('action:ajaxify.end', function(ev, data) {
        if (data.url !== 'login' && !app.user.uid) {

  • works! :) thank you so much @baris

  • oops, now new user cant register, it keeps redirect to login,


    if (data.url !== 'login' && data.url !== 'register' && !app.user.uid) {

Log in to reply

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.