package es.uniovi.asw.service;

import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import es.uniovi.asw.model.UserInfo;

@Service
@Transactional
public class UserService {

	public UserService() {

	}

	public boolean validar(UserInfo user) {

		return false;
	}

}

@@ -68,16 +68,78 @@
 ional;%0D%0A
+import org.springframework.beans.factory.annotation.Autowired;
 %0D%0Aimport
@@ -172,32 +172,79 @@
 otype.Service;%0D%0A
+import es.uniovi.asw.repository.UserRepository;
 %0D%0Aimport es.unio
@@ -322,16 +322,73 @@
 rvice %7B%0D
+%0A%09%0D%0A%09@Autowired%0D%0A%09private UserRepository userRepository;%0D
 %0A%0D%0A%09publ
@@ -461,12 +461,179 @@
  %7B%0D%0A
-%0D%0A%09%09
+          UserInfo u = this.userRepository.findByEmail(user.getEmail());%0D%0A          %0D%0A          if (u == null) %7B%0D%0A%09      return false;%0D%0A           %7D%0D%0A           %0D%0A        
 retu
@@ -643,17 +643,21 @@
 false;%0D%0A
-%09
+     
 %7D%0D%0A%0D%0A%7D%0D%0A

Update UserService