Changeset 14842

Show
Ignore:
Timestamp:
06/29/08 18:24:47 (5 years ago)
Author:
kumatch
Message:

Added the isAvailableEmail() method.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • events/phpframework/piece_framework/trunk/libs/Phwittr/Service.php

    r13635 r14842  
    77 * @package    Phwittr_PieceFramework 
    88 * @copyright  2008 KUMAKURA Yousuke All rights reserved. 
    9  * @version    SVN: $Id:$ 
     9 * @version    SVN: $Id$ 
    1010 * @since      File available since Release 0.1.0 
    1111 */ 
     
    127127 
    128128        $user = $mapper->findByUserName($userName); 
     129        if (is_null($user)) { 
     130            return true; 
     131        } else { 
     132            return false; 
     133        } 
     134    } 
     135 
     136    // }}} 
     137    // {{{ isAvailableEmail 
     138 
     139    /** 
     140     * メールアドレスが利用可能がどうか 
     141     *  
     142     * @param string $email 
     143     * @return string 
     144     */ 
     145    public function isAvailableEmail($email) 
     146    { 
     147        Phwittr_Config::configurePieceORM(); 
     148        $mapper = Piece_ORM::getMapper('Users'); 
     149 
     150        $user = $mapper->findByEmail($email); 
    129151        if (is_null($user)) { 
    130152            return true;