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
...@@ -120,10 +120,9 @@ ...@@ -120,10 +120,9 @@
$cas_user = str_replace('-','_',$cas_user); $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 //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 (!$_SESSION['user']->last_login)
if (!$lastlogin_date) {
forward('mod/profile/edit.php?firstlogin=yes'); forward('mod/profile/edit.php?firstlogin=yes');
} else
forward("pg/profile/unl_" . $cas_user); forward("pg/profile/unl_" . $cas_user);
} else { } else {
register_error(elgg_echo('loginerror')); register_error(elgg_echo('loginerror'));
...@@ -243,7 +242,6 @@ ...@@ -243,7 +242,6 @@
//Replace the hyphen in a student's name with an underscore //Replace the hyphen in a student's name with an underscore
$username = str_replace('-','_',$username); $username = str_replace('-','_',$username);
if ($user = get_user_by_username($username)) { if ($user = get_user_by_username($username)) {
// User exists, login // User exists, login
return login($user); return login($user);
......
...@@ -11,39 +11,23 @@ ...@@ -11,39 +11,23 @@
* @link http://elgg.org/ * @link http://elgg.org/
*/ */
// require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
global $CONFIG; global $CONFIG;
// action_gatekeeper(); action_gatekeeper();
// Get variables
$email = get_input('email'); $email = get_input('email');
// var_dump($email);
$email = sanitise_string($email); $email = sanitise_string($email);
// var_dump($email);
if (is_email_address($email)) if (is_email_address($email)) {
{ if (!get_user_by_email($email)) {
if (!get_user_by_email($email))
{
forward('?loginwith=UNLlogin&email=' . $email); forward('?loginwith=UNLlogin&email=' . $email);
} } else {
else
{
register_error(elgg_echo("Sorry, that email has already been registered. Please try again.")); register_error(elgg_echo("Sorry, that email has already been registered. Please try again."));
} }
} } else {
else
{
register_error(elgg_echo("Sorry, that is not a complete email address. Please try again.")); register_error(elgg_echo("Sorry, that is not a complete email address. Please try again."));
} }
$qs = explode('?',$_SERVER['HTTP_REFERER']); $qs = explode('?',$_SERVER['HTTP_REFERER']);
$qs = $qs[0]; $qs = $qs[0];
$qs .= "?e=" . urlencode($email); $qs .= "?e=" . urlencode($email);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment