def get_user_with_username(self,username,is_active = True): res = self.db_exec.execute_query("select * from ss_userbase where username ='******'") ret=[] if not res: return ret if type(is_active) == bool: for usr in res: susr = stored_user(usr) if susr.status.is_active() == is_active: ret.append(susr) else: for usr in res: ret.append(stored_user(usr)) return ret
def get_user_with_username(self, username, is_active=True): res = self.db_exec.execute_query( "select * from ss_userbase where username ='******'") ret = [] if not res: return ret if type(is_active) == bool: for usr in res: susr = stored_user(usr) if susr.status.is_active() == is_active: ret.append(susr) else: for usr in res: ret.append(stored_user(usr)) return ret
def active_user_with_username(self,name): res = self.db_exec.execute_query("select * from ss_userbase where username = '******'") #if s is null or empty (-> False) if not res: return False for usr in res: if stored_user(usr).status.is_active(): return True return False
def active_user_with_username(self, name): res = self.db_exec.execute_query( "select * from ss_userbase where username = '******'") #if s is null or empty (-> False) if not res: return False for usr in res: if stored_user(usr).status.is_active(): return True return False
def get_user_by_id(self,id): return stored_user(self.db_exec.execute_query("select * from ss_userbase where id = "+id)[0])
def get_user_by_id(self, id): return stored_user( self.db_exec.execute_query( "select * from ss_userbase where id = " + id)[0])