Revision 373
- Date:
- 2013/08/14 13:09:20
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/users/lib/users/Email.pm
15 15 'cases' => [ 16 16 [0, 'Не активен'], 17 17 [1, 'Подтвержден'], 18 [2, 'Основной'], 19 18 [3, 'Потерян / заблокирован'], 20 19 ], 21 20 }, … … 55 54 sub contenido_status_style 56 55 { 57 56 my $self = shift; 58 if ( $self->status == 2 ) { 57 if ( $self->main == 1 || $self->status == 2 ) { 59 58 return 'color:green;'; 60 59 } elsif ( $self->status == 3 ) { 61 return 'color:red;'; 60 return 'color:black;'; 62 61 } 63 62 } 64 63 -
utf8/plugins/users/lib/users/OA/Credential.pm
44 44 sub contenido_status_style 45 45 { 46 46 my $self = shift; 47 if ( $self->status == 3 ) { 48 return 'color:red;'; 47 if ( $self->main == 1 || $self->status == 2 ) { 48 return 'color:green;'; 49 } elsif ( $self->status == 3 ) { 50 return 'color:black;'; 49 51 } 50 52 } 51 53 -
utf8/plugins/users/lib/users/Phone.pm
11 11 'cases' => [ 12 12 [0, 'Не активен'], 13 13 [1, 'Подтвержден'], 14 [2, 'Основной'], 15 14 [3, 'Потерян / заблокирован'], 16 15 ], 17 16 }, … … 45 44 sub contenido_status_style 46 45 { 47 46 my $self = shift; 48 if ( $self->status == 2 ) { 47 if ( $self->main == 1 || $self->status == 2 ) { 49 48 return 'color:green;'; 50 49 } elsif ( $self->status == 3 ) { 51 return 'color:red;'; 50 return 'color:black;'; 52 51 } 53 52 } 54 53 -
utf8/plugins/users/lib/users/UserProfile.pm
316 316 $object->uid( $self->id ); 317 317 $object->confirm( Digest::MD5::md5_hex(int(rand(1000000)), $self->id, $opts{email}) ); 318 318 $object->store; 319 } else { 320 if ( exists $opts{status} && $object->status != $opts{status} ) { 321 $object->status( $opts{status} ); 322 $object->store; 323 } 319 324 } 325 if ( $opts{main} ) { 326 my $sql = $keeper->SQL->prepare('update profile_credentials set main = 0 where class = ? and uid = ? and id != ?'); 327 $sql->execute( $object->class, $self->id, $object->id ); 328 $sql->finish; 329 } 320 330 } elsif ( $opts{phone} ) { 321 331 ($object) = $self->keeper->get_documents( 322 332 class => 'users::Phone', … … 335 345 $object->uid( $self->id ); 336 346 $object->confirm( Digest::MD5::md5_hex(int(rand(1000000)), $self->id, $opts{email}) ); 337 347 $object->store; 348 } else { 349 if ( exists $opts{status} && $object->status != $opts{status} ) { 350 $object->status( $opts{status} ); 351 $object->store; 352 } 338 353 } 354 if ( $opts{main} ) { 355 my $sql = $keeper->SQL->prepare('update profile_credentials set main = 0 where class = ? and uid = ? and id != ?'); 356 $sql->execute( $object->class, $self->id, $object->id ); 357 $sql->finish; 358 } 339 359 } 340 360 return $object; 341 361 }