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
feb6fc38
Commit
feb6fc38
authored
5 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
fix db connection
parent
69ab56ca
master
MLAB-677
devel
devel_wolfgang
patch-1
reset-jul13
reset-merge
test_logoutbutton
testing
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
routes/routes.js
+2
-2
routes/routes.js
with
2 additions
and
2 deletions
+2
-2
routes/routes.js
+
2
-
2
View file @
feb6fc38
...
@@ -183,7 +183,7 @@ module.exports = function (app, config, passport) {
...
@@ -183,7 +183,7 @@ module.exports = function (app, config, passport) {
if
(
req
.
isAuthenticated
())
{
if
(
req
.
isAuthenticated
())
{
if
(
userData
.
email
)
{
if
(
userData
.
email
)
{
dbconn
.
query
(
'
UPDATE user SET ? WHERE email = "
'
+
userData
.
email
+
'
"
'
,
userData
,
function
(
err
,
rows
,
fields
)
{
dbconn
.
user
.
query
(
'
UPDATE user SET ? WHERE email = "
'
+
userData
.
email
+
'
"
'
,
userData
,
function
(
err
,
rows
,
fields
)
{
//if (err) throw err;
//if (err) throw err;
if
(
err
)
{
if
(
err
)
{
req
.
flash
(
'
error
'
,
"
Failed
"
);
req
.
flash
(
'
error
'
,
"
Failed
"
);
...
@@ -208,7 +208,7 @@ module.exports = function (app, config, passport) {
...
@@ -208,7 +208,7 @@ module.exports = function (app, config, passport) {
var
retypePwd
=
req
.
body
.
inputConfirm
var
retypePwd
=
req
.
body
.
inputConfirm
// Load hashed passwd from DB.
// Load hashed passwd from DB.
dbconn
.
query
(
'
SELECT password FROM user WHERE email="
'
+
req
.
user
.
email
+
'
"
'
,
function
(
err
,
rows
,
fields
)
{
dbconn
.
user
.
query
(
'
SELECT password FROM user WHERE email="
'
+
req
.
user
.
email
+
'
"
'
,
function
(
err
,
rows
,
fields
)
{
if
(
err
)
{
if
(
err
)
{
res
.
redirect
(
'
/500
'
)
res
.
redirect
(
'
/500
'
)
throw
err
throw
err
...
...
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