/**
* Primary endpoint menu callback.
*/
function _rlogin_endpoint() {

global $base_url;
global $user;

// Include CSS when specified
$css_url = variable_get('rlogin_css_url', '');
if (strlen($css_url) > 10) {
$css = sprintf("
\n", $css_url);
} else {
$css = '';
}

// Output style sheet file as an inline style sheet
echo $css;

// When already logged in....
if ($user->uid) {

// ...don't show form, but instead a link to the site.
print "

\n";

} else {

// Process the POSTED form
if (isset($_POST) AND is_array($_POST)) {
// in theory, we just received our own form. Call the real user login.
$_GET['q'] = $base_url . "?destination=node"; // send to front page redundant?? fixme
}

// Get the login form HTML
$form = drupal_get_form(LOGIN_FORM);

// Output the div and form HTML
echo "\n

\n";
echo $form . "\n";
echo "

\n";

}

}

CommentFileSizeAuthor
#1 _rlogin_endpoint.zip788 byteselanghout

Comments

elanghout’s picture

StatusFileSize
new788 bytes

See attached script for function _rlogin_endpoint()

Also _rlogin_get_css() can be removed I think, because it's not referenced.