Changeset 353 for LATMOS-Accounts


Ignore:
Timestamp:
08/17/09 02:28:58 (15 years ago)
Author:
nanardon
Message:
  • revaliases can exists in Sql base only is the corresponding exists, checking this or ignoring creation
File:
1 edited

Legend:

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

    r302 r353  
    66 
    77use base qw(LATMOS::Accounts::Bases::Sql::objects); 
     8use LATMOS::Accounts::Log; 
    89 
    910our $VERSION = (q$Rev: 341 $ =~ /^Rev: (\d+) /)[0]; 
     
    4344sub has_extended_attributes { 0 } 
    4445 
     46sub _create { 
     47    my ($class, $base, $id, %data) = @_; 
     48 
     49    $base->get_object('user', $id) or do { 
     50        $base->log(LA_ERR, 'Cannot create revaliases %s: no such user', $id); 
     51        return; 
     52    }; 
     53 
     54    $class->SUPER::_create($base, $id, %data); 
     55} 
     56 
    45571; 
    4658 
Note: See TracChangeset for help on using the changeset viewer.