Commit c7da7f76 authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

redirect URL reset to local devel URLs

parent 9a226bc9
......@@ -62,7 +62,7 @@ module.exports = function (app, config, passport, i18n) {
failureFlash: true
}),
function (req, res) {
res.redirect('/account/');
res.redirect('/');
}
);
......@@ -104,7 +104,7 @@ module.exports = function (app, config, passport, i18n) {
}
})
} else {
res.redirect('/account/login'); // localhost
res.redirect('/login'); // localhost
}
});
......@@ -122,7 +122,7 @@ module.exports = function (app, config, passport, i18n) {
app.get('/logout', function (req, res) {
if (req.user == null) {
return res.redirect('/account/');
return res.redirect('/');
}
req.user.nameID = req.user.id;
......@@ -153,7 +153,7 @@ module.exports = function (app, config, passport, i18n) {
}
})
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
......@@ -217,7 +217,7 @@ module.exports = function (app, config, passport, i18n) {
}
])
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
......@@ -227,7 +227,7 @@ module.exports = function (app, config, passport, i18n) {
user: req.user // useful for view engine, useless for HTML
});
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
......@@ -257,7 +257,7 @@ module.exports = function (app, config, passport, i18n) {
})
}
} else {
res.redirect('/account/login');
res.redirect('/login');
}
});
......@@ -272,7 +272,7 @@ module.exports = function (app, config, passport, i18n) {
// Load hashed passwd from DB
dbconn.user.query('SELECT password FROM credential WHERE user_id='+userId, function (err, rows, fields) {
if (err) {
res.redirect('/account/500')
res.redirect('/500')
throw err
}
var userPwd = rows[0].password
......@@ -280,14 +280,14 @@ module.exports = function (app, config, passport, i18n) {
// check if the password is correct
bcrypt.compare(currPwd, userPwd, function(err, isMatch) {
if (err) {
res.redirect('/account/500')
res.redirect('/500')
throw err
}
else if (!isMatch) {
//req.flash('error', "Sorry, your password was incorrect. Please double-check your password.")
req.flash('error', "Das Passwort ist leider falsch. Bitte überprüfen Sie Ihre Eingabe.")
//res.redirect('/account/security')
res.redirect('/account/security')
//res.redirect('/security')
res.redirect('/security')
}
else {
if ( newPwd != retypePwd ) {
......@@ -321,7 +321,7 @@ module.exports = function (app, config, passport, i18n) {
}
});
}
res.redirect('/account/security')
res.redirect('/security')
})
});
});
......@@ -333,7 +333,7 @@ module.exports = function (app, config, passport, i18n) {
})
}
else {
res.redirect('/account/login');
res.redirect('/login');
}
});
......@@ -408,8 +408,8 @@ module.exports = function (app, config, passport, i18n) {
//req.flash('success', 'If your email is registered, an e-mail has been sent to ' + emailAddress + ' with further instructions.');
req.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + emailAddress + ' versendet.');
}
//res.redirect('/account/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost
//res.redirect('/forgotPwd'); // deployment
res.redirect('/forgotPwd'); // localhost
});
});
......@@ -418,8 +418,8 @@ module.exports = function (app, config, passport, i18n) {
if (!user) {
//req.flash('error', 'Password reset token is invalid or has expired.');
req.flash('error', 'Der Schlüssel zum zurücksetzen des Passworts ist ungültig oder abgelaufen.');
//res.redirect('/account/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost
//res.redirect('/forgotPwd'); // deployment
res.redirect('/forgotPwd'); // localhost
}
else {
res.render(lang+'/account/reset');
......@@ -458,7 +458,7 @@ module.exports = function (app, config, passport, i18n) {
}
});
// redirect to login page
res.redirect('/account/login')
res.redirect('/login')
}
})
});
......@@ -466,7 +466,7 @@ module.exports = function (app, config, passport, i18n) {
}
else {
req.flash('error', "User not found.")
res.redirect('/account/login')
res.redirect('/login')
}
});
......@@ -512,7 +512,7 @@ module.exports = function (app, config, passport, i18n) {
//req.flash('success', 'Your account has been created. Please log in.')
req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.')
}
res.redirect('/account/registration');
res.redirect('/registration');
})
});
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment