Correction UserManager
Corrections mineures ArticleManager
This commit is contained in:
@@ -13,7 +13,6 @@ import javax.persistence.NoResultException;
|
|||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
import javax.persistence.Query;
|
import javax.persistence.Query;
|
||||||
import javax.transaction.UserTransaction;
|
import javax.transaction.UserTransaction;
|
||||||
|
|
||||||
import org.yacos.core.article.Article.State;
|
import org.yacos.core.article.Article.State;
|
||||||
import org.yacos.core.article.Preference.PreferenceType;
|
import org.yacos.core.article.Preference.PreferenceType;
|
||||||
import org.yacos.core.conferences.Conference;
|
import org.yacos.core.conferences.Conference;
|
||||||
@@ -87,12 +86,11 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
|||||||
persistentArticle.setSecondaryAuthors(article.getSecondaryAuthors());
|
persistentArticle.setSecondaryAuthors(article.getSecondaryAuthors());
|
||||||
ut.commit();
|
ut.commit();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
try {
|
try {
|
||||||
ut.rollback();
|
ut.rollback();
|
||||||
e.printStackTrace();
|
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
// TODO Auto-generated catch block
|
e.printStackTrace();
|
||||||
e1.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,12 +182,11 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
|||||||
ut.commit();
|
ut.commit();
|
||||||
this.updateArticle(article);
|
this.updateArticle(article);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
try {
|
try{
|
||||||
ut.rollback();
|
ut.rollback();
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,14 +198,47 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void delegateArticleToReferee(Integer articleId, String refereeId, String memberId){
|
public void delegateArticleToReferee(Integer articleId, String refereeId, String memberId){
|
||||||
Article article = this.getArticle(articleId);
|
try{
|
||||||
User PCMember = em.find(User.class, memberId);
|
ut.begin();
|
||||||
User referee = em.find(User.class, refereeId);
|
Article article = this.getArticle(articleId);
|
||||||
article.delegateTo(referee,PCMember);
|
User PCMember = em.find(User.class, memberId);
|
||||||
|
User referee = em.find(User.class, refereeId);
|
||||||
|
Delegation delegation = new Delegation();
|
||||||
|
delegation.setArticle(article);
|
||||||
|
delegation.setPcMember(PCMember);
|
||||||
|
delegation.setReferee(referee);
|
||||||
|
em.persist(delegation);
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try{
|
||||||
|
ut.rollback();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void undelegateArticleToReferee(Integer articleId, String refereeId, String memberId){
|
public void undelegateArticleToReferee(Integer articleId, String refereeId, String memberId){
|
||||||
//TODO
|
try{
|
||||||
|
ut.begin();
|
||||||
|
Article article = this.getArticle(articleId);
|
||||||
|
User PCMember = em.find(User.class, memberId);
|
||||||
|
User referee = em.find(User.class, refereeId);
|
||||||
|
Query query = em.createQuery(
|
||||||
|
"delete from Delegation where article=:article and referee=:referee and pcMember=:pcMember")
|
||||||
|
.setParameter("article", article)
|
||||||
|
.setParameter("referee", referee)
|
||||||
|
.setParameter("pcMember", PCMember);
|
||||||
|
int affectedRows = query.executeUpdate();
|
||||||
|
System.out.println("Affected Rows :"+affectedRows);
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try{
|
||||||
|
ut.rollback();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package org.yacos.core.users;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.ejb.Remote;
|
import javax.ejb.Remote;
|
||||||
|
|
||||||
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
||||||
import org.yacos.core.exceptions.UserEMailAlreadyExistsException;
|
import org.yacos.core.exceptions.UserEMailAlreadyExistsException;
|
||||||
import org.yacos.core.system.InvitationToken;
|
import org.yacos.core.system.InvitationToken;
|
||||||
@@ -23,6 +22,7 @@ public interface IUserManager {
|
|||||||
throws PKAlreadyUsedException, UserEMailAlreadyExistsException;
|
throws PKAlreadyUsedException, UserEMailAlreadyExistsException;
|
||||||
public void removeUser(String login);
|
public void removeUser(String login);
|
||||||
public User getUser(String login);
|
public User getUser(String login);
|
||||||
|
public User getUserByEmail(String email);
|
||||||
public void UpdateUser(User user);
|
public void UpdateUser(User user);
|
||||||
public Boolean exists(String login);
|
public Boolean exists(String login);
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ public interface IUserManager {
|
|||||||
public List<User> getUsers();
|
public List<User> getUsers();
|
||||||
public List<User> getUsers(int conf_id);
|
public List<User> getUsers(int conf_id);
|
||||||
public List<User> getUsers(int conf_id, Role.RoleType type);
|
public List<User> getUsers(int conf_id, Role.RoleType type);
|
||||||
public List<User> getRefereesOFPCMemberForArticle(String PCMemberLogin, Integer articleId);
|
public List<User> getRefereesOfPcMemberForArticle(String PCMemberLogin, Integer articleId);
|
||||||
public List<User> getPCMemberForArticle(Integer articleId);
|
public List<User> getPCMemberForArticle(Integer articleId);
|
||||||
|
|
||||||
//speciality methodes
|
//speciality methodes
|
||||||
@@ -41,7 +41,7 @@ public interface IUserManager {
|
|||||||
public void addSpecialityToUser(int specialityId,String login);
|
public void addSpecialityToUser(int specialityId,String login);
|
||||||
public void removeSpecialityFromUser(int specialityId, String login);
|
public void removeSpecialityFromUser(int specialityId, String login);
|
||||||
public List<Speciality> getSpecialitiesFromUser(String login);
|
public List<Speciality> getSpecialitiesFromUser(String login);
|
||||||
public boolean existe(Speciality spe);
|
public boolean specialityExists(Speciality spe);
|
||||||
//roles methods
|
//roles methods
|
||||||
/**
|
/**
|
||||||
* Create and adds a role to a user
|
* Create and adds a role to a user
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class User implements Serializable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email) {
|
public void setEmail(String email) {
|
||||||
this.email = email;
|
this.email = email.toLowerCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSpeciality(Speciality spe){
|
public void addSpeciality(Speciality spe){
|
||||||
|
|||||||
@@ -6,12 +6,16 @@ package org.yacos.core.users;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.ejb.Stateless;
|
import javax.ejb.Stateless;
|
||||||
|
import javax.ejb.TransactionManagement;
|
||||||
|
import javax.ejb.TransactionManagementType;
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
import javax.persistence.NoResultException;
|
import javax.persistence.NoResultException;
|
||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
import javax.persistence.Query;
|
import javax.persistence.Query;
|
||||||
|
import javax.transaction.UserTransaction;
|
||||||
|
import org.yacos.core.article.Article;
|
||||||
import org.yacos.core.conferences.Conference;
|
import org.yacos.core.conferences.Conference;
|
||||||
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
||||||
import org.yacos.core.exceptions.UserEMailAlreadyExistsException;
|
import org.yacos.core.exceptions.UserEMailAlreadyExistsException;
|
||||||
@@ -24,9 +28,12 @@ import org.yacos.core.users.Role.RoleType;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Stateless
|
@Stateless
|
||||||
|
@TransactionManagement(TransactionManagementType.BEAN)
|
||||||
public class UserManagerBean implements IUserManager{
|
public class UserManagerBean implements IUserManager{
|
||||||
@PersistenceContext
|
@PersistenceContext
|
||||||
EntityManager em;
|
EntityManager em;
|
||||||
|
@Resource
|
||||||
|
private UserTransaction ut;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<User> getUsers(){
|
public List<User> getUsers(){
|
||||||
@@ -47,10 +54,11 @@ public class UserManagerBean implements IUserManager{
|
|||||||
if(this.getByEmail(email) != null){
|
if(this.getByEmail(email) != null){
|
||||||
throw new UserEMailAlreadyExistsException(email);
|
throw new UserEMailAlreadyExistsException(email);
|
||||||
}
|
}
|
||||||
|
try{
|
||||||
|
ut.begin();
|
||||||
User user = new User(login, password, firstName, lastName, organization, email);
|
User user = new User(login, password, firstName, lastName, organization, email);
|
||||||
em.persist(user);
|
em.persist(user);
|
||||||
em.flush();
|
ut.commit();
|
||||||
|
|
||||||
// Existing InvitationToken handling
|
// Existing InvitationToken handling
|
||||||
List<InvitationToken> tokens = getInvitationTokensForEmail(user.getEmail());
|
List<InvitationToken> tokens = getInvitationTokensForEmail(user.getEmail());
|
||||||
@@ -59,17 +67,48 @@ public class UserManagerBean implements IUserManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{ throw new PKAlreadyUsedException(); }
|
else{ throw new PKAlreadyUsedException(); }
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a user from the system
|
* Removes a user and his article from the system
|
||||||
* @param user
|
* @param user
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings(value="unchecked")
|
||||||
public void removeUser(String login){
|
public void removeUser(String login){
|
||||||
|
try {
|
||||||
|
ut.begin();
|
||||||
User persistedUser = em.find(User.class, login);
|
User persistedUser = em.find(User.class, login);
|
||||||
|
|
||||||
|
// Delete the articles for this user
|
||||||
|
Query articlesQuery = em.createQuery("from Article where mainauthor=?");
|
||||||
|
articlesQuery.setParameter(1, persistedUser);
|
||||||
|
List<Article> articles = articlesQuery.getResultList();
|
||||||
|
for(Article article : articles){
|
||||||
|
em.remove(article);
|
||||||
|
}
|
||||||
|
|
||||||
em.remove(persistedUser);
|
em.remove(persistedUser);
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUser(String login) {
|
public User getUser(String login) {
|
||||||
@@ -87,7 +126,23 @@ public class UserManagerBean implements IUserManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateUser(User user){
|
public void UpdateUser(User user){
|
||||||
em.merge(user);
|
try {
|
||||||
|
ut.begin();
|
||||||
|
User updatedUser = em.find(User.class, user.getLogin());
|
||||||
|
updatedUser.setEmail(user.getEmail());
|
||||||
|
updatedUser.setFirstName(user.getFirstName());
|
||||||
|
updatedUser.setLastName(user.getLastName());
|
||||||
|
updatedUser.setOrganization(user.getOrganization());
|
||||||
|
updatedUser.setPassword(user.getPassword());
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean exists(String login){
|
public Boolean exists(String login){
|
||||||
@@ -119,10 +174,12 @@ public class UserManagerBean implements IUserManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List<User> getRefereesOFPCMemberForArticle(String PCMemberLogin, Integer articleId){
|
public List<User> getRefereesOfPcMemberForArticle(String PCMemberLogin, Integer articleId){
|
||||||
Query query = em.createQuery("select user from User user, Articles_referees_map a WHERE a.user_id = user.login and a.article_id = ?");
|
Query query = em.createQuery("select delegation.referee from Delegation delegation WHERE delegation.article=? and delegation.pcMember=?");
|
||||||
query.setParameter(1, articleId);
|
Article article = em.find(Article.class, articleId);
|
||||||
query.setParameter(2, PCMemberLogin);
|
User pcMember = em.find(User.class, PCMemberLogin);
|
||||||
|
query.setParameter(1, article);
|
||||||
|
query.setParameter(2, pcMember);
|
||||||
return query.getResultList();
|
return query.getResultList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,31 +196,74 @@ public class UserManagerBean implements IUserManager{
|
|||||||
|
|
||||||
|
|
||||||
public void addSpeciality(String name){
|
public void addSpeciality(String name){
|
||||||
Speciality spe = new Speciality(name);
|
try{
|
||||||
if(!existe(spe)){
|
ut.begin();
|
||||||
em.persist(spe);
|
Speciality spe = new Speciality(name);
|
||||||
em.flush();
|
if(!specialityExists(spe)){
|
||||||
|
em.persist(spe);
|
||||||
|
em.flush();
|
||||||
|
}
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeSpeciality(int specialityId){
|
public void removeSpeciality(int specialityId){
|
||||||
Speciality spe = em.find(Speciality.class, specialityId);
|
try {
|
||||||
em.remove(spe);
|
ut.begin();
|
||||||
em.flush();
|
Speciality spe = em.find(Speciality.class, specialityId);
|
||||||
|
em.remove(spe);
|
||||||
|
em.flush();
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSpecialityToUser(int specialityId,String login){
|
public void addSpecialityToUser(int specialityId,String login){
|
||||||
User user = this.getUser(login);
|
try {
|
||||||
Speciality spe = this.getSpeciality(specialityId);
|
ut.begin();
|
||||||
user.addSpeciality(spe);
|
User user = em.find(User.class, login);
|
||||||
this.UpdateUser(user);
|
Speciality spe = em.find(Speciality.class, specialityId);
|
||||||
|
user.addSpeciality(spe);
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeSpecialityFromUser(int specialityId, String login){
|
public void removeSpecialityFromUser(int specialityId, String login){
|
||||||
User user = this.getUser(login);
|
try {
|
||||||
Speciality spe = this.getSpeciality(specialityId);
|
ut.begin();
|
||||||
user.getSpecialities().remove(spe);
|
User user = em.find(User.class, login);
|
||||||
this.UpdateUser(user);
|
Speciality spe = em.find(Speciality.class, specialityId);
|
||||||
|
user.getSpecialities().remove(spe);
|
||||||
|
em.remove(spe);
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@@ -173,7 +273,7 @@ public class UserManagerBean implements IUserManager{
|
|||||||
return query.getResultList();
|
return query.getResultList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean existe(Speciality spe){
|
public boolean specialityExists(Speciality spe){
|
||||||
List<Speciality> list = this.getSpecialities();
|
List<Speciality> list = this.getSpecialities();
|
||||||
for (Speciality spe2 : list) {
|
for (Speciality spe2 : list) {
|
||||||
if(spe2.getName().equalsIgnoreCase(spe.getName())){
|
if(spe2.getName().equalsIgnoreCase(spe.getName())){
|
||||||
@@ -194,21 +294,45 @@ public class UserManagerBean implements IUserManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addRoleForConference(String login, RoleType role, Integer conferenceId) {
|
public void addRoleForConference(String login, RoleType role, Integer conferenceId) {
|
||||||
User user = em.find(User.class, login);
|
try {
|
||||||
Conference conference = em.find(Conference.class, conferenceId);
|
User user = em.find(User.class, login);
|
||||||
|
Conference conference = em.find(Conference.class, conferenceId);
|
||||||
|
|
||||||
Role newRole = new Role();
|
ut.begin();
|
||||||
newRole.setUser(user);
|
|
||||||
newRole.setConference(conference);
|
Role newRole = new Role();
|
||||||
newRole.setType(role);
|
newRole.setUser(user);
|
||||||
em.persist(newRole);
|
newRole.setConference(conference);
|
||||||
|
newRole.setType(role);
|
||||||
|
em.persist(newRole);
|
||||||
|
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeRole(String userLogin, RoleType roleType, int conferenceId) {
|
public void removeRole(String userLogin, RoleType roleType, int conferenceId) {
|
||||||
User user = em.find(User.class, userLogin);
|
try {
|
||||||
Conference conference = em.find(Conference.class, conferenceId);
|
ut.begin();
|
||||||
Role role = em.find(Role.class, new RolePK(user,roleType,conference));
|
User user = em.find(User.class, userLogin);
|
||||||
em.remove(role);
|
Conference conference = em.find(Conference.class, conferenceId);
|
||||||
|
Role role = em.find(Role.class, new RolePK(user,roleType,conference));
|
||||||
|
em.remove(role);
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@@ -222,7 +346,19 @@ public class UserManagerBean implements IUserManager{
|
|||||||
InvitationTokenPK tokenId) {
|
InvitationTokenPK tokenId) {
|
||||||
InvitationToken token = em.find(InvitationToken.class,tokenId);
|
InvitationToken token = em.find(InvitationToken.class,tokenId);
|
||||||
addRoleForConference(userLogin, token.getRole(), token.getConference().getId());
|
addRoleForConference(userLogin, token.getRole(), token.getConference().getId());
|
||||||
em.remove(token);
|
|
||||||
|
try {
|
||||||
|
ut.begin();
|
||||||
|
em.remove(token);
|
||||||
|
ut.commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
ut.rollback();
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasRoleForConference(String userLogin, RoleType roleType,
|
public boolean hasRoleForConference(String userLogin, RoleType roleType,
|
||||||
@@ -242,5 +378,16 @@ public class UserManagerBean implements IUserManager{
|
|||||||
return aQuery.getResultList();
|
return aQuery.getResultList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public User getUserByEmail(String email) {
|
||||||
|
Query query = em.createQuery("from User where email=?");
|
||||||
|
query.setParameter(1, email);
|
||||||
|
try{
|
||||||
|
User user = (User) query.getSingleResult();
|
||||||
|
return user;
|
||||||
|
} catch (NoResultException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user