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
+	}
+}