constrows:any=awaitdbconn.user.promise().query('SELECT id, verificationStatus, salutation, title, firstname, lastname, industry, organisation, speciality, m4lab_idp FROM user WHERE email = "'+email+'"')
constrows:any=awaitdbConnection.user.promise().query('SELECT id, verificationStatus, salutation, title, firstname, lastname, industry, organisation, speciality, m4lab_idp FROM user WHERE email = "'+email+'"')
if(rows[0][0]){
returnrows[0][0]
}else{returnnull}
...
...
@@ -77,7 +77,7 @@ const dbController = {
},
getUserEmailById:asyncfunction(userId:number){
try{
constrows:any=awaitdbconn.user.promise().query('SELECT email FROM user WHERE id = '+userId)
constrows:any=awaitdbConnection.user.promise().query('SELECT email FROM user WHERE id = '+userId)
if(rows[0][0]){
returnrows[0][0].email
}else{returnnull}
...
...
@@ -88,7 +88,7 @@ const dbController = {
},
checkUserEmail:asyncfunction(email:any){
try{
constrows:any=awaitdbconn.user.promise().query('SELECT id, email FROM user WHERE email = "'+email+'"')
constrows:any=awaitdbConnection.user.promise().query('SELECT id, email FROM user WHERE email = "'+email+'"')
if(rows[0][0]){
returnrows[0][0]
}else{returnnull}
...
...
@@ -99,7 +99,7 @@ const dbController = {
},
getUserByToken:asyncfunction(token:any){
try{
constrows:any=awaitdbconn.user.promise().query('SELECT t1.user_id, t2.email FROM userdb.credential AS t1 INNER JOIN userdb.user AS t2 ON t1.user_id = t2.id AND t1.resetPasswordToken = "'+
constrows:any=awaitdbConnection.user.promise().query('SELECT t1.user_id, t2.email FROM userdb.credential AS t1 INNER JOIN userdb.user AS t2 ON t1.user_id = t2.id AND t1.resetPasswordToken = "'+
constrows:any=awaitdbconn.user.promise().query('SELECT gu.gitlab_userId FROM user_gitlab gu, user u WHERE u.id = "'+userId+'" and gu.user_id = u.id')
constrows:any=awaitdbConnection.user.promise().query('SELECT gu.gitlab_userId FROM user_gitlab gu, user u WHERE u.id = "'+userId+'" and gu.user_id = u.id')
if(rows[0][0]){
returnrows[0][0].gitlab_userId
}else{
...
...
@@ -198,7 +198,7 @@ const dbController = {
}
},
addGitlabUser:function(data:any,callback:any){
dbconn.user.query('INSERT INTO user_gitlab SET ?',data,function(err:any){
dbConnection.user.query('INSERT INTO user_gitlab SET ?',data,function(err:any){
'<p>vielen Dank für Ihre Anmeldung am Transferportal der HFT Stuttgart. <br/>'+
'Um Ihre Anmeldung zu bestätigen, klicken Sie bitte <a href='+String(config.app.host)+'/verifyAccount?token='+String(newAccount.verificationToken)+'>diesen Link</a> '+
'<br/><br/>'+
'Ohne Bestätigung Ihres Kontos müssen wir Ihr Konto leider nach 7 Tagen löschen.</p><br/>'+String(miscConst.mailSignature)+
'<p>wir haben Ihre Anfrage zur Erneuerung Ihres Passwortes erhalten. Falls Sie diese Anfrage nicht gesendet haben, ignorieren Sie bitte diese E-Mail.<br/><br/>'+
'Sie können Ihr Passwort mit dem Klick auf diesen Link ändern: '+String(config.app.host)+'/reset/'+String(token)+'<br/>'+
'Dieser Link ist aus Sicherheitsgründen nur für 1 Stunde gültig.<br/></p>'+String(miscConst.mailSignature)+'</div>'