add registration switch env
This commit is contained in:
		@@ -77,6 +77,9 @@ def logout():
 | 
			
		||||
def register():
 | 
			
		||||
    if current_user.is_authenticated:
 | 
			
		||||
        return redirect(url_for('index'))
 | 
			
		||||
    if not app.config['ALLOW_REGISTRATION'] == "true":
 | 
			
		||||
        flash('Registration temporarily disabled.')
 | 
			
		||||
        return redirect(url_for('login'))
 | 
			
		||||
    form = RegistrationForm()
 | 
			
		||||
    if form.validate_on_submit():
 | 
			
		||||
        user = User(username=form.username.data, email=form.email.data)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user