diff options
author | Struan Donald <struan@exo.org.uk> | 2011-11-16 10:25:52 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-11-16 10:25:52 +0000 |
commit | 02ba98ebd01d8bbcbf322dfb94931717b633cfaa (patch) | |
tree | 44cda93328ae85b67ccb5a69c164a76d1529c726 | |
parent | 375610803cfcad104049ff895c77c53e6767e1e7 (diff) |
split name into first and last name for open311 submission
-rw-r--r-- | perllib/Open311.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index f3f642895..4ce867852 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -48,12 +48,16 @@ Submitted via FixMyStreet EOT ; + my ( $firstname, $lastname ) = ( $problem->user->name =~ /(\w+)\s+(.+)/ ); + my $params = { lat => $problem->latitude, long => $problem->longitude, email => $problem->user->email, description => $description, service_code => $service_code, + first_name => $firstname, + last_name => $lastname || '', }; if ( $problem->user->phone ) { |