forked from science-ation/science-ation
typo
This commit is contained in:
parent
582ffb6586
commit
28004d6fe8
@ -510,7 +510,7 @@ function user_auth_required($all_required = array(), $one_required = array())
|
||||
$ok = true;
|
||||
|
||||
unset($_SESSION['request_uri']);
|
||||
if(!isset($_SESSION['roles'] || !isset($_SESSION['users_id']))) {
|
||||
if(!isset($_SESSION['roles']) || !isset($_SESSION['users_id'])) {
|
||||
message_push(error(i18n("You must login to view that page")));
|
||||
$_SESSION['request_uri'] = $_SERVER['REQUEST_URI'];
|
||||
header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type");
|
||||
|
@ -33,9 +33,6 @@
|
||||
'salutation' => array('name' => 'Salutation'),
|
||||
'firstname' => array('name' => 'First Name'),
|
||||
'lastname' => array('name' => 'Last Name'),
|
||||
'email' => array('name' => 'Email Address'),
|
||||
'username' => array('name' => 'Username'),
|
||||
'password' => array('name' => 'Password'),
|
||||
'address' => array('name' => 'Address 1'),
|
||||
'address2' => array('name' => 'Address 2'),
|
||||
'city' => array('name' => 'City'),
|
||||
@ -125,10 +122,6 @@ case 'save':
|
||||
}
|
||||
}
|
||||
|
||||
if(!in_array('username', $fields) || !array_key_exists('username', $u) || $u['username'] == '') {
|
||||
$u['username'] = $u['email'];
|
||||
}
|
||||
|
||||
if(array_key_exists('committee', $u['roles'])) {
|
||||
/* Trying to save a committee member eh? Well, we established above
|
||||
* that we're allowed to be here, so go ahead and save it */
|
||||
@ -169,15 +162,6 @@ case 'save':
|
||||
}
|
||||
|
||||
|
||||
/* Check for an email collision */
|
||||
$em = mysql_escape_string(stripslashes($_POST['email']));
|
||||
$q=mysql_query("SELECT * FROM accounts WHERE email='$em' AND id!='{$u['accounts_id']}' AND deleted='no' ");
|
||||
if(mysql_num_rows($q) > 0) {
|
||||
error_("That email address is in use by another user");
|
||||
echo "email error";
|
||||
$save = false;
|
||||
}
|
||||
|
||||
if($save == true) {
|
||||
user_save($u);
|
||||
happy_("%1 %2 successfully updated",array($u['firstname'],$u['lastname']));
|
||||
@ -284,12 +268,8 @@ item($u, 'firstname');
|
||||
item($u, 'lastname');
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
item($u, 'email');
|
||||
item($u, 'salutation');
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
item($u, 'username', '(if different from Email)');
|
||||
item($u, 'password');
|
||||
echo "<td></td><td></td>";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
item($u, 'address');
|
||||
|
Loading…
Reference in New Issue
Block a user