Skip to content

Commit cfda866

Browse files
committed
Merge branch 'master' of https://github.com/chrisx84/opensimweb
2 parents 5d06170 + faf3691 commit cfda866

File tree

5 files changed

+25
-30
lines changed

5 files changed

+25
-30
lines changed

Diff for: inc/Users.class.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ function login($user, $pass, $remember) {
9595
function logout_user() {
9696
$session_names = array('id', 'time', 'code');
9797
$ses_uuid = $_SESSION[$this->osw->config['cookie_prefix'] . 'id'];
98-
$ses_code = $_SESSION[$this->osw->config['cookie_prefix'] . 'code'];
9998
if (isset($ses_code)) {
100-
$this->osw->SQL->query("DELETE FROM `{$this->osw->config['db_prefix']}sessions` WHERE code = '$ses_code'");
99+
$this->osw->SQL->query("DELETE FROM `{$this->osw->config['db_prefix']}sessions` WHERE id = '$ses_uuid'");
101100
}
102101
$_SESSION = array();
103102

@@ -107,11 +106,10 @@ function logout_user() {
107106

108107
if (isset($_COOKIE[$this->osw->config['cookie_prefix'] . 'id'])) {
109108
foreach ($session_names as $value) {
110-
setcookie($this->osw->config['cookie_prefix'] . $value, 0, time() - 3600, $this->osw->config['cookie_path'], $this->osw->config['cookie_domain']);
109+
setcookie($this->osw->config['cookie_prefix'] . $value, 0, time() - 3600, $this->osw->config['cookie_path'], $this->osw->config['cookie_domain'], false, false);
111110
}
112111
}
113-
114-
$this->osw->redirect($this->osw->config['logout_redirect']);
112+
return true;
115113
}
116114

117115
function check_user_exist($first, $last) {

Diff for: inc/menu.php

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<a href='#' class="dropdown-toggle" data-toggle="dropdown"><?php echo $user; ?> <b class='caret'></b></a>
6060
<ul class="dropdown-menu">
6161
<li><a href='<?php echo $site_address; ?>/profile.php?u=<?php echo $userproflink;?>'>Profile</a></li>
62+
<li><a href='<?php echo $site_address; ?>/logout.php'>Logout</a></li>
6263
<li class="divider"></li>
6364
<?php
6465
if ($osw->grid->isAdmin($user_uuid)) {

Diff for: logout.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22
define('OSW_IN_SYSTEM', true);
3-
require_once('inc/header.php');
4-
$osw->Users->logout_user();
3+
require_once('inc/headerless.php');
4+
if ($osw->Users->logout_user()) {
5+
$osw->redirect($osw->config['logout_redirect']);
6+
}
57
include ('inc/footer.php');
68
?>

Diff for: register.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
$hide_sidebars = true;
44
define('OSW_IN_SYSTEM', true);
55
require_once('inc/header.php');
6-
$osw->Security->check_auth_registration();
76

8-
if ($osw->user_info['username']) {
7+
if (!$user_uuid) {
98
if (isset($_POST['process'])) {
109
if ($osw->Users->register_user()) {
1110
switch ($osw->config['activation_type']) {

Diff for: register_form.php

+16-21
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,47 @@
33
exit;
44
}
55
?>
6-
<fieldset>
7-
<legend>
8-
Register
9-
</legend>
106
<form action="register.php" method="post">
117
<input type="hidden" name="process" value="true" />
128
<div class="container">
139
<div class="row">
14-
<div class="col-md-6">
10+
<div class="col-md-12">
1511
<div class="panel panel-default">
1612
<div class="panel-heading"><i class="fa fa-lock"></i> Register</div>
1713
<div class="panel-body">
1814

1915
<div class="form-group">
2016
<label for="InputFirst" class="col-sm-3 control-label">Avatar First Name</label>
2117
<div class="col-sm-9">
22-
<input type="text" id="InputFirst" name="firstname" maxlength="100" value="" required />
18+
<input type="text" id="InputFirst" class="form-control" name="firstname" maxlength="100" value="" required />
2319
</div>
2420
</div>
2521

2622
<div class="form-group">
2723
<label for="InputLast" class="col-sm-3 control-label">Avatar Last Name</label>
2824
<div class="col-sm-9">
29-
<input type="text" id="InputLast" name="lastname" maxlength="100" value="" required />
25+
<input type="text" id="InputLast" class="form-control" name="lastname" maxlength="100" value="" required />
3026
</div>
3127
</div>
3228

3329
<div class="form-group">
34-
<label for="InputPassword" class="col-sm-3 control-label">Password</label>
30+
<label for="InputPassword" class="col-sm-3 control-label">Password <font color="Red">*</font></label>
3531
<div class="col-sm-9">
36-
<input type="password" id="InputPassword" name="password" maxlength="<?php echo $osw->config['max_password']; ?>" required />
37-
<?php echo $osw->config['min_password']; ?> - <?php echo $osw->config['max_password']; ?> characters
32+
<input type="password" id="InputPassword" class="form-control" name="password" maxlength="<?php echo $osw->config['max_password']; ?>" required />
3833
</div>
3934
</div>
4035

4136
<div class="form-group">
42-
<label for="InputCPassword" class="col-sm-3 control-label">Confirm Password</label>
37+
<label for="InputCPassword" class="col-sm-3 control-label">Confirm Password <font color="Red">*</font></label>
4338
<div class="col-sm-9">
44-
<input type="password" id="InputCPassword" name="password_c" maxlength="<?php echo $osw->config['max_password']; ?>" required />
39+
<input type="password" id="InputCPassword" class="form-control" name="password_c" maxlength="<?php echo $osw->config['max_password']; ?>" required />
4540
</div>
4641
</div>
4742

4843
<div class="form-group">
49-
<label for="InputEmail" class="col-sm-3 control-label">Email Address</label>
44+
<label for="InputEmail" class="col-sm-3 control-label">Email site_address</label>
5045
<div class="col-sm-9">
51-
<input type="text" id="InputEmail" name="email" maxlength="100" value="" required />
46+
<input type="text" id="InputEmail" class="form-control" name="email" maxlength="100" value="" required />
5247
</div>
5348
</div>
5449
<?php
@@ -83,7 +78,8 @@
8378
<div class="form-group">
8479
<label for="Submit" class="col-sm-3 control-label"></label>
8580
<div class="col-sm-9">
86-
<input type="submit" id="Submit" value="Register" class="btn btn-primary" />
81+
<input type="submit" id="Submit" value="Register" class="btn btn-primary" /><br>
82+
<br><small><font color="Red">*</font> Passwords MUST be <?php echo $osw->config['min_password']; ?> to <?php echo $osw->config['max_password']; ?> characters</small>
8783
</div>
8884
</div>
8985

@@ -99,12 +95,11 @@
9995
This website uses cookies to store login information so the system knows its you without forcing you to login all the time.<br>
10096
By registering you agree to allow this site place a cookie on your computer.<br>
10197
Don't worry it doesn't store your password. Just your uuid, the current time and your session id.<br>
102-
For more information go google Opensimweb.<br>
98+
For more information google Opensimweb.<br>
10399
<br>
104-
When registering you agree to our <a href='<?php echo $address; ?>/tos.php'>Terms of Service</a> and our <a href='<?php echo $address; ?>/privacypolicy.php'>Cookie and Privacy Policy</a><br>
105-
We only require a valid email address at registration to confirm that you are human and not a spam bot.<br>
100+
When registering you agree to our <a href='<?php echo $site_address; ?>/tos.php'>Terms of Service</a> and our <a href='<?php echo $site_address; ?>/privacypolicy.php'>Cookie and Privacy Policy</a><br>
101+
We only require a valid email site_address at registration to confirm that you are human and not a spam bot.<br>
106102
We wont email you anything else without your approval.<br>
107-
We also will NOT sell or give your email address to any annoying spam company because we hate spam too.
103+
We also will NOT sell or give your email site_address to any annoying spam company because we hate spam too.
108104
</small>
109-
</p>
110-
</fieldset>
105+
</p>

0 commit comments

Comments
 (0)