Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
e32c0fcc
Commit
e32c0fcc
authored
Dec 10, 2019
by
Wolfgang Knopki
Browse files
change of header if email is valid
parent
eb839e6c
Pipeline
#369
passed with stage
in 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/js/account.js
View file @
e32c0fcc
...
...
@@ -23,6 +23,12 @@ $.get( "/api/v1/profile", function(data) {
$
(
"
#inputIndustry
"
).
val
(
industry
);
$
(
"
#inputOrganisation
"
).
val
(
organisation
);
$
(
"
#inputSpeciality
"
).
val
(
speciality
);
// check for valid email and then change header accordingly:
if
(
email
!=
''
){
document
.
getElementById
(
"
navbarDropdown4
"
).
innerHTML
=
"
Logout
"
;
document
.
getElementById
(
"
navbarDropdown4
"
).
href
=
"
/account/logout
"
;
}
})
.
done
(
function
()
{
console
.
log
(
"
done
"
);
...
...
routes/routes.js
View file @
e32c0fcc
...
...
@@ -88,7 +88,7 @@ module.exports = function (app, config, passport) {
);
app
.
get
(
'
/profile
'
,
function
(
req
,
res
)
{
if
(
req
.
isAuthenticated
())
{
if
(
req
.
isAuthenticated
())
{
res
.
render
(
'
profile
'
,
{
user
:
req
.
user
// useful for view engine, useless for HTML
});
...
...
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