06f2d398dcc75f9613f8917f5d79da0d8c06219f dschmelt Mon Aug 1 14:58:57 2022 -0700 Adding tool for user lookup on gbMembers No RM diff --git src/utils/qa/userLookup src/utils/qa/userLookup new file mode 100755 index 0000000..515b079 --- /dev/null +++ src/utils/qa/userLookup @@ -0,0 +1,24 @@ +#!/bin/bash +echo "This command gives you a user account based on email or username" + +if [[ $# -ne 1 ]]; then + echo "Usage: userEmailLookup email@youGetThePoint.com" + exit 2 +fi +input="$1" + +printf "\nDEV's gbMembers (=Beta):\n" +hgsql -e "select * from gbMembers where email='$input' union all select * from gbMembers where userName='$input'\G" hgcentraltest +printf "\nRR's gbMembers (=Euro/Asia):\n" +hgsql -h genome-centdb -e "select * from gbMembers where email='$input' union all select * from gbMembers where userName='$input'\G" hgcentral + +printf "\nGo here to see their previous ML questions:\n" +printf "http://redmine.soe.ucsc.edu/projects/maillists/search?q=$input" + +userNameRR=`hgsql -h genome-centdb -e "select userName from gbMembers where email='$input' union all select userName from gbMembers where userName='$input'" hgcentral` +printf "Here is their userNameRR(s):" +echo "$userNameRR" + +printf "\nHere is the command to update an email:\n" +echo "hgsql -h genome-centdb -e \"update gbMembers set email='NEW_EMAIL' where userName='USERNAME'\" hgcentral" +