MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / _does_user_exist

Function _does_user_exist

web/pgadmin/utils/__init__.py:864–880  ·  view source on GitHub ↗

This function will check user is exist or not. If exist then return

(user, from_setup, auth_source=INTERNAL)

Source from the content-addressed store, hash-verified

862
863
864def _does_user_exist(user, from_setup, auth_source=INTERNAL):
865 """
866 This function will check user is exist or not. If exist then return
867 """
868 if isinstance(user, User):
869 auth_source = user.auth_source
870 user = user.username
871
872 new_user = User.query.filter_by(username=user,
873 auth_source=auth_source).first()
874
875 if new_user is None:
876 print(USER_NOT_FOUND % user)
877 if from_setup:
878 sys.exit(1)
879
880 return new_user
881
882
883def _handle_error(error_msg, from_setup):

Callers 3

dump_database_serversFunction · 0.85
load_database_serversFunction · 0.85
clear_database_serversFunction · 0.85

Calls 1

firstMethod · 0.65

Tested by

no test coverage detected