File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import {
1515} from '@/features/instance/operations/mutations/useInstanceResetPasswordMutation' ;
1616import { getInstanceUserInfo } from '@/features/instance/operations/queries/getInstanceUserInfo' ;
1717import { AddUserFormSchema } from '@/features/instance/operations/schemas/addUserFormSchema' ;
18+ import { useCloudAuth } from '@/hooks/useAuth' ;
1819import { authStore } from '@/lib/authStore' ;
1920import { getOperationsUrlForCluster } from '@/lib/urls/getOperationsUrlForCluster' ;
2021import { zodResolver } from '@hookform/resolvers/zod' ;
@@ -26,6 +27,7 @@ import { toast } from 'sonner';
2627import { z } from 'zod' ;
2728
2829export function ClusterSetPassword ( ) {
30+ const { user } = useCloudAuth ( ) ;
2931 const { clusterId } : { clusterId : string ; } = useParams ( { strict : false } ) ;
3032 const { data : cluster } = useQuery (
3133 getClusterInfoQueryOptions ( clusterId , true ) ,
@@ -44,7 +46,7 @@ export function ClusterSetPassword() {
4446 confirmPassword : '' ,
4547 password : '' ,
4648 role : 'super_user' ,
47- username : '' ,
49+ username : user ?. email ?? '' ,
4850 } ,
4951 } ) ;
5052 const tempPassword = cluster ?. instances ?. find ( i => i . tempPassword ) ?. tempPassword ;
You can’t perform that action at this time.
0 commit comments