Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
c7da7f76
Commit
c7da7f76
authored
5 years ago
by
Wolfgang Knopki
Browse files
Options
Download
Email Patches
Plain Diff
redirect URL reset to local devel URLs
parent
9a226bc9
master
MLAB-677
devel
devel_wolfgang
patch-1
reset-jul13
reset-merge
test_logoutbutton
testing
1 merge request
!2
Mlab 56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
routes/routes-account.js
+36
-36
routes/routes-account.js
with
36 additions
and
36 deletions
+36
-36
routes/routes-account.js
+
36
-
36
View file @
c7da7f76
...
...
@@ -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
'
);
})
});
});
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets