1
0

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