Changeset 448

Show
Ignore:
Timestamp:
11/12/08 18:53:09 (2 months ago)
Author:
nicolas
Message:

User : prénom en miniscule sauf première lettre de chaque prénom composé

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/model/User.php

    r3 r448  
    11<?php 
    2  
    3 require_once 'lib/model/om/BaseUser.php'; 
    4  
    5  
    62/** 
    73 * Skeleton subclass for representing a row from the 'user' table. 
     
    2016  } 
    2117 
    22        public function setLastname($v) 
    23        
    24                if ($this->lastname !== $v) { 
    25                        $this->lastname = strtoupper($v); 
    26                        $this->modifiedColumns[] = UserPeer::LASTNAME; 
    27                
    28        
     18  public function setLastname($v) 
     19 
     20    if ($this->lastname !== $v) { 
     21      $this->lastname = strtoupper($v); 
     22      $this->modifiedColumns[] = UserPeer::LASTNAME; 
     23   
     24 
    2925 
    30        public function setFirstname($v) 
    31        
    32                if ($this->firstname !== $v) { 
    33                        $this->firstname = ucfirst(strtolower($v)); 
    34                        $this->modifiedColumns[] = UserPeer::FIRSTNAME; 
    35                
    36        
     26  public function setFirstname($v) 
     27 
     28    if ($this->firstname !== $v) { 
     29      $this->firstname = ucwords(strtolower($v)); 
     30      $this->modifiedColumns[] = UserPeer::FIRSTNAME; 
     31   
     32 
    3733 
    38        public function setTel($v) 
    39        {  
    40                if ($this->tel !== $v) { 
    41                        $this->tel = ereg_replace("[^0-9]","",$v);  
    42                        $this->modifiedColumns[] = UserPeer::TEL; 
    43                
    44        
     34  public function setTel($v) 
     35  {  
     36    if ($this->tel !== $v) { 
     37      $this->tel = ereg_replace("[^0-9]","",$v);  
     38      $this->modifiedColumns[] = UserPeer::TEL; 
     39   
     40 
    4541 
    46        public function setFax($v) 
    47        {  
    48                if ($this->fax !== $v) { 
    49                        $this->fax = ereg_replace("[^0-9]","",$v);  
    50                        $this->modifiedColumns[] = UserPeer::FAX; 
    51                
    52        
     42  public function setFax($v) 
     43  {  
     44    if ($this->fax !== $v) { 
     45      $this->fax = ereg_replace("[^0-9]","",$v);  
     46      $this->modifiedColumns[] = UserPeer::FAX; 
     47   
     48 
    5349 
    54        public function setPassword($v) 
    55        
    56                if ($this->password !== $v) { 
    57                $this->password = sha1($v); 
    58                        $this->modifiedColumns[] = UserPeer::PASSWORD; 
    59                
    60        
     50  public function setPassword($v) 
     51 
     52    if ($this->password !== $v) { 
     53      $this->password = sha1($v); 
     54      $this->modifiedColumns[] = UserPeer::PASSWORD; 
     55   
     56 
    6157 
    62        public function getTel() 
    63        
    64                return ereg_replace("([0-9]{2})", "\\0 ", $this->tel); 
    65        
     58  public function getTel() 
     59 
     60    return ereg_replace("([0-9]{2})", "\\0 ", $this->tel); 
     61 
    6662 
    67         public function getFax() 
    68         { 
    69                 return ereg_replace("([0-9]{2})", "\\0 ", $this->fax); 
    70         } 
    71          
    72         public function getActiveTxt() 
    73         { 
    74                 if($this->getActive()) return 'Oui'; 
    75                 else return 'Non'; 
    76         } 
     63  public function getFax() 
     64  { 
     65    return ereg_replace("([0-9]{2})", "\\0 ", $this->fax); 
     66  } 
     67 
     68  public function getActiveTxt() 
     69  { 
     70    if($this->getActive()) return 'Oui'; else return 'Non'; 
     71  } 
    7772} // User