function urllogin_status_page in urllogin 7
Same name and namespace in other branches
- 6 urllogin.inc \urllogin_status_page()
Displays status page and allows a URL string to be generated for test purposes.
Parameters
$testuid: Optional UID for generating a test URL login string
Return value
Page containing test results
1 string reference to 'urllogin_status_page'
- urllogin_menu in ./
urllogin.module - Implements hook_menu().
File
- ./
urllogin.inc, line 108
Code
function urllogin_status_page($testuid = 0) {
$uid = (int) $testuid;
//this will sanitize it as well
if (isset($GLOBALS['urllogin_passphrase'])) {
// first see if it is in settings.php
$passkey = 'set from settings.php';
}
else {
$passkey = variable_get('urllogin_passphrase', 'no passphrase defined');
if (variable_get('urllogin_add_dbpass', '0') != 0) {
// we don't really want to give away the actual database access string
$passkey .= ' + database string';
}
}
$codekey = variable_get('urllogin_codekey', 0);
$codemin = variable_get('urllogin_codemin', 0);
$page = '<h2> ' . urllogin_help('admin/help#checkin', 0) . '</h2><ul>';
$page .= '<li>' . t('Test UID') . ': ' . $uid . '</li>';
$page .= '<li>' . t('Passphrase') . ': ' . $passkey . '</li>';
$page .= '<li>' . t('Current Validation number') . ': ' . $codekey . '</li>';
$page .= '<li>' . t('Minimum validation number') . ': ' . $codemin . '</li>';
$urlstr = urllogin_encode($uid, $codekey, urllogin_passphrase());
$page .= '<li>' . t('Encoded URL access string: [') . $urlstr . ']</li>';
$page .= '</ul>';
$testlink = 'l_test/' . $urlstr;
$page .= '<p>' . t('This page can be used to generate individual access strings for testing purposes.
Simply add the UID of the user to the end of the url for this page, revisit the page and the
access string will be displayed above.') . '</p><p>' . t('To test the access string, use') . ' ' . l(t('the test page'), 'l_test/') . ' ' . t('by appending the access string to it, e.g.:') . ' ' . l($testlink, $testlink) . '</p>';
return $page;
}