MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / EditUser

Function EditUser

Goldleaf/source/acc/acc_UserSelection.cpp:92–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 }
91
92 Result EditUser(std::function<void(AccountProfileBase*, AccountUserData*)> cb) {
93 AccountProfile prof;
94 auto rc = accountGetProfile(&prof, g_SelectedUser);
95 if(R_SUCCEEDED(rc)) {
96 AccountProfileBase prof_base = {};
97 AccountUserData user_data = {};
98 rc = accountProfileGet(&prof, &user_data, &prof_base);
99 if(R_SUCCEEDED(rc)) {
100 AccountExtProfileEditor editor;
101 rc = accountextGetProfileEditor(g_SelectedUser, &editor);
102 if(R_SUCCEEDED(rc)) {
103 cb(&prof_base, &user_data);
104 rc = accountextProfileEditorStore(&editor, &prof_base, &user_data);
105 accountextProfileEditorClose(&editor);
106 }
107 }
108 accountProfileClose(&prof);
109 }
110 return rc;
111 }
112
113 Result EditUserIcon(const u8 *jpg, const size_t size) {
114 AccountProfile prof;

Callers 1

optsRename_DefaultKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected