vodvud / php_zklib

GNU General Public License v2.0
23 stars 19 forks source link

How can I add user? #4

Closed maodahua closed 5 years ago

maodahua commented 5 years ago

Hi there! I use a setUser function but I can not add user, could you please tell me how to add user.

vodvud commented 5 years ago

Hi! It's work fine, see example: $zk->setUser(1, '1', 'User1', '', ZK\Util::LEVEL_USER);

where the parameters

1) int $uid Unique ID (max 65535) 2) int|string $userid (max length = 9, only numbers - depends device setting) 3) string $name (max length = 24) 4) int|string $password (max length = 8, only numbers - depends device setting) 5) int $role Default Util::LEVEL_USER

Check it and try again.

maodahua commented 5 years ago

eeeeem..... Hi! I retry it WORK! and it is my bad. I ignore $uid max is 2^16. thanks a lot! I am a starter of php and zk devices. but I must use php to build a website, get users fingerprint return value is annoy me. so , could you please give me a example? how to get the fingerprint and show the fingerprint. thank again!

vodvud commented 5 years ago

Sorry, but Fingerprint still uncompleted. I need more documentation about it, or play with data and try.

maodahua commented 5 years ago

OK, thanks . step up efforts!