Пример #1
0
	def login(self, userName, password):
		"""
		用户登录
		returns:
			true:登录成功
			false:登录失败
		"""
		
		if DBUserInfo.login(userName, password):
			Logger.info("用户验证成功")
			userInfo = UserInfo(userName, 0);
			from webapp.Common import Common
			Common.session.userInfo = userInfo
			# 初始化菜单数据
			from MenuManagement import MenuManagement
			Common.session.menu = MenuManagement(userName)
			return True
		else:
			Logger.info("用户验证失败")
			return False;