# Copyright (c) 2010 bivio Software, Inc. All Rights Reserved. # $Id: EmailForDomainList.PL,v 2.1 2010/04/29 18:41:25 nagler Exp $ my($users) = [qw(demo root)]; my($domain) = sub { return ($_[0] ? $_[0] . '@' : '') . 'emailfordomain.com'; }; foreach my $u (@$users) { unauth_model(Email => {realm_id => realm_id($u)}) ->update({email => $domain->($u)}); } ($domain, $users);