mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	This commit is contained in:
		@@ -34,6 +34,7 @@
 | 
			
		||||
	"account/edit/password": "Editing password of \"%1\"",
 | 
			
		||||
	"account/edit/username": "Editing username of \"%1\"",
 | 
			
		||||
	"account/edit/email": "Editing email of \"%1\"",
 | 
			
		||||
	"account/info": "Account Info",
 | 
			
		||||
	"account/following": "People %1 follows",
 | 
			
		||||
	"account/followers": "People who follow %1",
 | 
			
		||||
	"account/posts": "Posts made by %1",
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@
 | 
			
		||||
 | 
			
		||||
	"email": "Email",
 | 
			
		||||
	"confirm_email": "Confirm Email",
 | 
			
		||||
	"account_info": "Account Info",
 | 
			
		||||
	"ban_account": "Ban Account",
 | 
			
		||||
	"ban_account_confirm": "Do you really want to ban this user?",
 | 
			
		||||
	"unban_account": "Unban Account",
 | 
			
		||||
@@ -125,5 +126,12 @@
 | 
			
		||||
 | 
			
		||||
	"sso.title": "Single Sign-on Services",
 | 
			
		||||
	"sso.associated": "Associated with",
 | 
			
		||||
	"sso.not-associated": "Click here to associate with"
 | 
			
		||||
	"sso.not-associated": "Click here to associate with",
 | 
			
		||||
 | 
			
		||||
	"info.latest-flags": "Latest Flags",
 | 
			
		||||
	"info.no-flags": "No Flagged Posts Found",
 | 
			
		||||
	"info.ban-history": "Recent Ban History",
 | 
			
		||||
	"info.no-ban-history": "This user has never been banned",
 | 
			
		||||
	"info.banned-until": "Banned until %1",
 | 
			
		||||
	"info.banned-permanently": "Banned permanently"
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
var accountsController = {
 | 
			
		||||
	profile: require('./accounts/profile'),
 | 
			
		||||
	edit: require('./accounts/edit'),
 | 
			
		||||
	info: require('./accounts/info'),
 | 
			
		||||
	settings: require('./accounts/settings'),
 | 
			
		||||
	groups: require('./accounts/groups'),
 | 
			
		||||
	follow: require('./accounts/follow'),
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ var setupPageRoute = helpers.setupPageRoute;
 | 
			
		||||
 | 
			
		||||
module.exports = function (app, middleware, controllers) {
 | 
			
		||||
	var middlewares = [middleware.checkGlobalPrivacySettings];
 | 
			
		||||
	var accountMiddlewares = [middleware.checkGlobalPrivacySettings, middleware.checkAccountPermissions];
 | 
			
		||||
	var accountMiddlewares = [middleware.checkGlobalPrivacySettings, middleware.checkAccountPermissions, middleware.exposeUid];
 | 
			
		||||
 | 
			
		||||
	setupPageRoute(app, '/uid/:uid/:section?', middleware, [], middleware.redirectUidToUserslug);
 | 
			
		||||
 | 
			
		||||
@@ -25,6 +25,7 @@ module.exports = function (app, middleware, controllers) {
 | 
			
		||||
	setupPageRoute(app, '/user/:userslug/edit/username', middleware, accountMiddlewares, controllers.accounts.edit.username);
 | 
			
		||||
	setupPageRoute(app, '/user/:userslug/edit/email', middleware, accountMiddlewares, controllers.accounts.edit.email);
 | 
			
		||||
	setupPageRoute(app, '/user/:userslug/edit/password', middleware, accountMiddlewares, controllers.accounts.edit.password);
 | 
			
		||||
	setupPageRoute(app, '/user/:userslug/info', middleware, accountMiddlewares, controllers.accounts.info.get);
 | 
			
		||||
	setupPageRoute(app, '/user/:userslug/settings', middleware, accountMiddlewares, controllers.accounts.settings.get);
 | 
			
		||||
 | 
			
		||||
	app.delete('/user/:userslug/session/:uuid', accountMiddlewares, controllers.accounts.session.revoke);
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ var utils = require('../public/src/utils');
 | 
			
		||||
	require('./user/approval')(User);
 | 
			
		||||
	require('./user/invite')(User);
 | 
			
		||||
	require('./user/password')(User);
 | 
			
		||||
	require('./user/info')(User);
 | 
			
		||||
 | 
			
		||||
	User.updateLastOnlineTime = function(uid, callback) {
 | 
			
		||||
		callback = callback || function() {};
 | 
			
		||||
 
 | 
			
		||||
@@ -22,9 +22,7 @@ module.exports = function(User) {
 | 
			
		||||
				return callback(err);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			callback(null, ips.map(function(ip) {
 | 
			
		||||
				return {ip:ip};
 | 
			
		||||
			}));
 | 
			
		||||
			callback(null, ips);
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
@@ -68,6 +66,7 @@ module.exports = function(User) {
 | 
			
		||||
		var tasks = [
 | 
			
		||||
			async.apply(User.setUserField, uid, 'banned', 1),
 | 
			
		||||
			async.apply(db.sortedSetAdd, 'users:banned', Date.now(), uid),
 | 
			
		||||
			async.apply(db.sortedSetAdd, 'uid:' + uid + ':bans', Date.now(), until)
 | 
			
		||||
		];
 | 
			
		||||
 | 
			
		||||
		if (until > 0 && Date.now() < until) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user