ZKLibrary icon indicating copy to clipboard operation
ZKLibrary copied to clipboard

Add user card while setting user

Open forexknight opened this issue 7 years ago • 7 comments

Hello,

I would like to know if it is possible to add user with card number? Function setUser takes $uid, $userid, $name, $password, $role) parameters, so is there any solution to add $cardNumber parameter?.

forexknight avatar Oct 31 '17 11:10 forexknight

The device that I used to develop this library is not support RFID card.

kamshory avatar Nov 05 '17 03:11 kamshory

has anyone managed to add the $cardNumber field?

kemboidickson avatar Mar 25 '18 09:03 kemboidickson

has anyone find a solution to get or set the cardNumber?

not-mounam avatar Apr 02 '18 14:04 not-mounam

$u = unpack('H144', substr($user_data, 0, 72)); $u1 = hexdec(substr($u[1], 2, 2)); $u2 = hexdec(substr($u[1], 4, 2)); $uid = $u1+($u2*256); // 2 byte $role = hexdec(substr($u[1], 6, 2)).' '; // 1 byte $password = hex2bin(substr( $u[1], 8, 16 )).' '; // 8 byte $name = hex2bin(substr($u[1], 24, 48 )). ' '; // 24 byte $card = hexdec(reverseHex(substr($u[1], 72, 8))). ' '; // 4 byte $userid = hex2bin(substr($u[1], 98, 72)).' '; // 36 byte $passwordArr = explode(chr(0), $password, 2); // explode to array $password = $passwordArr[0]; // get password $useridArr = explode(chr(0), $userid, 2); // explode to array $userid = $useridArr[0]; // get user ID $nameArr = explode(chr(0), $name, 3); // explode to array $name = $nameArr[0]; // get name

how to get card from the database

anditsung avatar Oct 29 '18 08:10 anditsung

Remember that this library is only to read attendance data and send it into your application. Card is not saved on the database but only on device. You are not necessary to read the card.

kamshory avatar Nov 02 '18 13:11 kamshory

Does anyone found solution for how to read RFID card no and also write it on device? thanks

tehceen avatar Mar 06 '19 10:03 tehceen

I did figure out.

On Wed, Mar 6, 2019 at 1:38 PM Tahseen Ullah [email protected] wrote:

Does anyone found solution for how to read RFID card no and also write it on device? thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kamshory/ZKLibrary/issues/14#issuecomment-470058073, or mute the thread https://github.com/notifications/unsubscribe-auth/ALD4FKPCXV8XBLqHCCTcAc48DkiE8TApks5vT5qygaJpZM4QMlw- .

--

Regards,

P_Kemoi

Tel: 0716973612

kemboidickson avatar Mar 21 '19 19:03 kemboidickson