1 커밋 7acc51e9dd ... 10873e664a

작성자 SHA1 메시지 날짜
  zry 10873e664a Add "UserExists" Method. 5 년 전
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      zTinyPasswd.go

+ 9 - 0
zTinyPasswd.go

@@ -237,3 +237,12 @@ func (this *PasswdManager) RenameUser(oldname string, new_name string) error {
 	this.stlock.Unlock()
 	return nil
 }
+
+func (this *PasswdManager) UserExists(username string) bool {
+	u := this._getUser(username)
+	if u == nil{
+		return false
+	}else {
+		return true
+	}
+}