mirror of
https://github.com/humhub/humhub.git
synced 2025-01-18 06:38:14 +01:00
- Add rememberMe flag to oauth links https://github.com/humhub/humhub/issues/3742
This commit is contained in:
parent
7a4507a391
commit
111abab8dd
@ -15,6 +15,7 @@ class UserAsset extends AssetBundle
|
||||
public $sourcePath = '@user/resources';
|
||||
public $css = [];
|
||||
public $js = [
|
||||
'js/humhub.user.js'
|
||||
'js/humhub.user.js',
|
||||
'js/humhub.user.login.js',
|
||||
];
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
humhub.module('user.login', function(module, require, $) {
|
||||
|
||||
var init = function() {
|
||||
$('body').on('click', '.authChoice .auth-link', function(e) {
|
||||
var checked = $('#login-rememberme').is(':checked');
|
||||
var $this = $(this);
|
||||
var original = $this.data('originalUrl');
|
||||
|
||||
if(!original) {
|
||||
original = $this.attr('href');
|
||||
$this.data('originalUrl', original);
|
||||
}
|
||||
|
||||
$this.attr('href', checked ? original + '&rememberme=1' : original);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
module.export({
|
||||
init: init
|
||||
});
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user