Mercurial > hg > fapweb
comparison msite.inc.php @ 70:d31fc2c53b2b
Added stUpdateUserKey(uid) for updating / regenerating a vote key for given UID.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 11 Oct 2013 09:32:00 +0300 |
parents | 30a4420e85ab |
children | d74fb8cf0062 |
comparison
equal
deleted
inserted
replaced
69:30a4420e85ab | 70:d31fc2c53b2b |
---|---|
498 } | 498 } |
499 } | 499 } |
500 } | 500 } |
501 | 501 |
502 | 502 |
503 function stUpdateUserKey($uid) | |
504 { | |
505 if (($res = stGenerateUserKey()) !== FALSE) | |
506 { | |
507 // Nope, add key into database | |
508 $sql = stPrepareSQL( | |
509 "UPDATE attendees SET key=%s,active=0 WHERE id=%d", | |
510 $key, $uid); | |
511 | |
512 return stExecSQL($sql); | |
513 } | |
514 else | |
515 return FALSE; | |
516 } | |
517 | |
518 | |
503 function stSetStatus($val, $msg) | 519 function stSetStatus($val, $msg) |
504 { | 520 { |
505 global $statusSet; | 521 global $statusSet; |
506 if (!$statusSet) | 522 if (!$statusSet) |
507 { | 523 { |