# HG changeset patch # User bsw # Date 1533309761 -7200 # Node ID b0ed2b11ea28c64cef27666251758104e4cbd00e # Parent 21a2443c97d7cc303add419a21c14cc2088233cc Renamed save hook diff -r 21a2443c97d7 -r b0ed2b11ea28 app/main/registration/_action/register.lua --- a/app/main/registration/_action/register.lua Fri Aug 03 17:15:49 2018 +0200 +++ b/app/main/registration/_action/register.lua Fri Aug 03 17:22:41 2018 +0200 @@ -151,6 +151,9 @@ elseif field.name == "mobile_phone" then value = string.gsub(value, "[^0-9]", "") elseif field.type == "image" then + if field.save_func then + value = field.save_func(value) + end else value = string.gsub(value, "^%s+", "") value = string.gsub(value, "%s+$", "")