code/user/provider/model.php
public function setUser(UserInterface $user)
    {
        parent::setUser($user);

        //Store the user by email
        if($email = $user->getEmail()) {
            $this->_emails[$email] = $user;
        }

        return $this;
    }
public function setUser(UserInterface $user)
    {
        parent::setUser($user);

        //Store the user by email
        if($email = $user->getEmail()) {
            $this->_emails[$email] = $user;
        }

        return $this;
    }
public function setUser ( UserInterface $ user ) { parent :: setUser ( $ user ) ; //Store the user by email if ( $ email = $ user -> getEmail ( ) ) { $ this -> _emails [ $ email ] = $ user ; } return $ this ; }
Set a user in the provider

@param UserInterface $user
@return boolean
Set a user in the provider