Skip to content
Snippets Groups Projects
Commit cdb8dcbf authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

cleanup some formatting

parent 31415adb
No related branches found
No related tags found
No related merge requests found
......@@ -119,12 +119,11 @@
system_message(elgg_echo('loginok'));
$cas_user = str_replace('-','_',$cas_user);
//user is logged in now, this is the last step - forward based on whether they have logged in before
$lastlogin_date = $_SESSION['user']->last_login;
if (!$lastlogin_date) {
//user is logged in now, this is the last step - forward based on whether they have logged in before
if (!$_SESSION['user']->last_login)
forward('mod/profile/edit.php?firstlogin=yes');
}
forward("pg/profile/unl_" . $cas_user);
else
forward("pg/profile/unl_" . $cas_user);
} else {
register_error(elgg_echo('loginerror'));
}
......@@ -243,7 +242,6 @@
//Replace the hyphen in a student's name with an underscore
$username = str_replace('-','_',$username);
if ($user = get_user_by_username($username)) {
// User exists, login
return login($user);
......
......@@ -24,7 +24,7 @@
//<input name=\"username\" type=\"text\" class="general-textarea" /></label>
?>
<div id="login" class="loginPage">
<div id="login" class="loginPage">
<div class="two_col left">
<h2 class="sec_main">Students, Faculty, Staff</h2>
......
......@@ -10,44 +10,28 @@
* @copyright Curverider Ltd 2008-2009
* @link http://elgg.org/
*/
// require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
global $CONFIG;
// action_gatekeeper();
// Get variables
$email = get_input('email');
// var_dump($email);
$email = sanitise_string($email);
// var_dump($email);
action_gatekeeper();
$email = get_input('email');
$email = sanitise_string($email);
if (is_email_address($email))
{
if (!get_user_by_email($email))
{
forward('?loginwith=UNLlogin&email=' . $email);
}
else
{
register_error(elgg_echo("Sorry, that email has already been registered. Please try again."));
}
if (is_email_address($email)) {
if (!get_user_by_email($email)) {
forward('?loginwith=UNLlogin&email=' . $email);
} else {
register_error(elgg_echo("Sorry, that email has already been registered. Please try again."));
}
else
{
register_error(elgg_echo("Sorry, that is not a complete email address. Please try again."));
}
} else {
register_error(elgg_echo("Sorry, that is not a complete email address. Please try again."));
}
$qs = explode('?',$_SERVER['HTTP_REFERER']);
$qs = $qs[0];
$qs .= "?e=" . urlencode($email);
forward($CONFIG->url . 'mod/cas_auth/views/default/account/getemail.php?e=' . urlencode($email));
$qs = explode('?',$_SERVER['HTTP_REFERER']);
$qs = $qs[0];
$qs .= "?e=" . urlencode($email);
forward($CONFIG->url . 'mod/cas_auth/views/default/account/getemail.php?e=' . urlencode($email));
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment