def adminblockUser(): try: loginVO = LoginVO() loginDAO = LoginDAO() loginId = request.args.get('loginId') print('loginId::', loginId) loginVO.loginId = loginId registerDAO = RegisterDAO() loginVO.loginRole = 'user' loginVO.loginStatus = 'inactive' loginDAO.validateLogin(loginVO) registerDAO.viewRegister() loginDAO.blockUser(loginVO) return redirect(url_for('adminViewUser')) except Exception as ex: print(ex)
def blockUser(): try: if session['loginRole'] == 'admin': registerVO = RegisterVO() registerDAO = RegisterDAO() loginDAO = LoginDAO() loginVO = LoginVO() registerVO.register_LoginId = loginVO.loginId = request.args.get( 'register_LoginId') registerVO.registerActiveStatus = loginVO.loginActiveStatus = 'deactive' registerDAO.blockUser(registerVO) loginDAO.blockUser(loginVO) return redirect(url_for('viewUser')) else: return render_template('admin/login.html') except: return render_template('admin/login.html')
def adminBlockUser(): try: if adminLoginSession() == 'admin': loginDAO = LoginDAO() loginVO = LoginVO() loginId = request.args.get('loginId') loginStatus = 'inactive' loginVO.loginId = loginId loginVO.loginStatus = loginStatus loginDAO.blockUser(loginVO) return adminViewUser() else: return adminLogoutSession() except Exception as ex: print(ex)