Skip to content

Commit

Permalink
🐛 Fix b3log#606
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Apr 5, 2018
1 parent c11ee0f commit 588967e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/b3log/symphony/service/UserMgmtService.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author Bill Ho
* @version 1.15.21.5, Apr 5, 2018
* @version 1.15.22.0, Apr 5, 2018
* @since 0.2.0
*/
@Service
Expand Down Expand Up @@ -410,6 +410,7 @@ public synchronized String addUser(final JSONObject requestJSONObject) throws Se
final String userName = requestJSONObject.optString(User.USER_NAME);
JSONObject user = userRepository.getByName(userName);
if (null != user && (UserExt.USER_STATUS_C_VALID == user.optInt(UserExt.USER_STATUS)
|| UserExt.USER_STATUS_C_INVALID_LOGIN == user.optInt(UserExt.USER_STATUS)
|| UserExt.NULL_USER_NAME.equals(userName))) {
if (transaction.isActive()) {
transaction.rollback();
Expand All @@ -424,7 +425,8 @@ public synchronized String addUser(final JSONObject requestJSONObject) throws Se
user = userRepository.getByEmail(userEmail);
int userNo = 0;
if (null != user) {
if (UserExt.USER_STATUS_C_VALID == user.optInt(UserExt.USER_STATUS)) {
if (UserExt.USER_STATUS_C_VALID == user.optInt(UserExt.USER_STATUS)
|| UserExt.USER_STATUS_C_INVALID_LOGIN == user.optInt(UserExt.USER_STATUS)) {
if (transaction.isActive()) {
transaction.rollback();
}
Expand Down

0 comments on commit 588967e

Please sign in to comment.