function urllogin_encode in urllogin 7
Same name and namespace in other branches
- 8 urllogin_security.inc \urllogin_encode()
- 6 urllogin_security.inc \urllogin_encode()
- 2.x urllogin_security.inc \urllogin_encode()
Encodes a user ID into an encoded url string.
Parameters
$uid: user ID to be encoded
$codekey: Integer containing current active code
$passkey: String containing encryption key phrase
Return value
encoded url string
3 calls to urllogin_encode()
- urllogin_status_page in ./
urllogin.inc - Displays status page and allows a URL string to be generated for test purposes.
- urllogin_userlist_page in ./
urllogin.inc - Link to download of user access URL's as a csv. A theme template file is needed of the page-urllogin-userlist.csv.tpl containing the single line: < ?php print $content; ? >
- _urllogin_retrieve in ./
urllogin.module - Callback for retrieving URL access details.
File
- ./
urllogin_security.inc, line 176 - Include file for urllogin security functions. This module is designed for easy drop-in replacement where an alternative encryption model is required.
Code
function urllogin_encode($uid, $codekey, $passkey) {
// first encrypt the two values
urllogin_encrypt($uid, $codekey, $x, $passkey);
// then encode them into a string suitable for embedding into a URL
return urllogin_base64enc($uid, $codekey, $x);
}