use of com.axelor.apps.base.db.repo.PartnerRepository in project axelor-open-suite by axelor.
the class MailServiceBaseImpl method resolve.
@Override
public Model resolve(String email) {
final UserRepository users = Beans.get(UserRepository.class);
final User user = users.all().filter("self.partner.emailAddress.address = ?1", email).fetchOne();
if (user != null) {
return user;
}
final PartnerRepository partners = Beans.get(PartnerRepository.class);
final Partner partner = partners.all().filter("self.emailAddress.address = ?1", email).fetchOne();
if (partner != null) {
return partner;
}
return super.resolve(email);
}
Aggregations