This commit is contained in:
2026-04-29 10:54:41 +08:00
parent 8c83383344
commit 3a84752c3e
+7 -2
View File
@@ -105,13 +105,18 @@ func GetUserAttributes(userID string) (map[string]string, error) {
attributes := make(map[string]string)
for rows.Next() {
var name, value string
var name string
var value *string
err := rows.Scan(&name, &value)
if err != nil {
log.Printf("[Repository] ✗ Error scanning user attribute: %v", err)
return nil, fmt.Errorf("error scanning user attribute: %w", err)
}
attributes[name] = value
if value != nil {
attributes[name] = *value
} else {
attributes[name] = ""
}
}
log.Printf("[Repository] ✓ Retrieved %d user attributes", len(attributes))