fixed an issue with the oauth authorization snippet, it was using the user database id to update the token and not the id of the trait

This commit is contained in:
Ayoub BENALI 2013-06-07 15:58:09 +02:00
parent 6ff32915f5
commit 087ceb0034

View File

@ -68,7 +68,10 @@ object OAuthAuthorisation {
if(appToken.verifier.isEmpty)
{
val randomVerifier = appToken.gernerateVerifier
appToken.userId(OBPUser.currentUserId.get)
//the user is logged in so we have the current user
val user = OBPUser.currentUser.get
//FIXME: The whole snippet still use OBPUser, we must change it to the User trait
appToken.userId(user.id_)
if(appToken.save())
verifier = randomVerifier
}