Baris Soner Usakli 11 years ago
commit feaea6dcea

@ -6,6 +6,7 @@ define(function() {
var loginData = {
'username': $('#username').val(),
'password': $('#password').val(),
'remember': $('#remember').prop('checked'),
'_csrf': $('#csrf-token').val()
};

@ -84,18 +84,34 @@
<input type="checkbox" data-field="profile:convertProfileImageToPNG"> <strong>Convert profile image uploads to PNG</strong>
</label>
</div>
<label>Maximum User Image File Size</label>
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" /><br />
<strong>Minimum Username Length</strong><br />
<input type="text" class="form-control" value="2" data-field="minimumUsernameLength"><br />
<strong>Maximum Username Length</strong><br />
<input type="text" class="form-control" value="16" data-field="maximumUsernameLength"><br />
<strong>Minimum Password Length</strong><br />
<input type="text" class="form-control" value="6" data-field="minimumPasswordLength"><br />
<strong>Maximum Signature Length</strong><br />
<input type="text" class="form-control" value="255" data-field="maximumSignatureLength"><br />
<strong>Forum Terms of Use <small>(Leave blank to disable)</small></strong><br />
<textarea class="form-control" data-field="termsOfUse"></textarea><br />
<div class="form-group">
<label>Days to remember user login sessions</label>
<input type="text" class="form-control" data-field="loginDays" placeholder="14" />
</div>
<div class="form-group">
<label>Maximum User Image File Size</label>
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" />
</div>
<div class="form-group">
<label>Minimum Username Length</label>
<input type="text" class="form-control" value="2" data-field="minimumUsernameLength">
</div>
<div class="form-group">
<label>Maximum Username Length</label>
<input type="text" class="form-control" value="16" data-field="maximumUsernameLength">
</div>
<div class="form-group">
<label>Minimum Password Length</label>
<input type="text" class="form-control" value="6" data-field="minimumPasswordLength">
</div>
<div class="form-group">
<label>Maximum Signature Length</label>
<input type="text" class="form-control" value="255" data-field="maximumSignatureLength">
</div>
<div class="form-group">
<label>Forum Terms of Use <small>(Leave blank to disable)</small></label>
<textarea class="form-control" data-field="termsOfUse"></textarea>
</div>
</div>
</form>
</div>

@ -29,15 +29,15 @@
<input class="form-control" type="password" placeholder="[[login:password]]" name="password" id="password" />
</div>
</div>
<!-- <div class="form-group">
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<div class="checkbox">
<label>
<input type="checkbox"> [[login:remember_me]]
<input type="checkbox" name="remember" id="remember" checked /> [[login:remember_me]]
</label>
</div>
</div>
</div> -->
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<hr />

@ -113,6 +113,14 @@
message: info.message
});
}
// Alter user cookie depending on passed-in option
if (req.body.remember === 'true') {
req.session.cookie.maxAge = 60*60*24*parseInt(meta.configs.loginDays || 14, 10);
} else {
req.session.cookie.expires = false;
}
req.login({
uid: user.uid
}, function() {

Loading…
Cancel
Save