Changeset 910


Ignore:
Timestamp:
02/24/12 12:51:04 (12 years ago)
Author:
nanardon
Message:
  • otheraddress return main address first
  • set lenght of uidnumber
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r861 r910  
    5050    $class->SUPER::_get_attr_schema($base, 
    5151        { 
    52             uidNumber => { inline => 1, iname => 'uidnumber', uniq => 1, 
    53                 mandatory => 1, }, 
     52            uidNumber => { 
     53                inline => 1, 
     54                iname => 'uidnumber', 
     55                uniq => 1, 
     56                mandatory => 1, 
     57                formopts => { length => 7 }, 
     58            }, 
    5459            uidnumber => { inline => 1, hide => 1, }, 
    5560            gidNumber => {  
     
    308313    } elsif ($field eq 'otheraddress') { 
    309314        my $sth = $self->db->prepare_cached(q{ 
    310             select name from address where "user" = ? 
     315            select name from address left join address_attributes 
     316            on address.ikey = address_attributes.okey and 
     317            address_attributes.attr = 'isMainAddress' 
     318            where "user" = ? 
     319            order by address_attributes.attr 
    311320        }); 
    312321        $sth->execute($self->id); 
Note: See TracChangeset for help on using the changeset viewer.