<?php
-/* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
+/* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
and is published under the AGPL license. */
class Syj_Model_UserMapper
return true;
}
+ public function findByPseudo($pseudo, Syj_Model_User $user) {
+ $table = $this->getDbTable();
+ $select = $table->select()->where('pseudo = ?', (string)$pseudo);
+ $row = $table->fetchRow($select);
+ if (!$row) {
+ return false;
+ }
+ $this->_itemFromRow($user, $row);
+ return true;
+ }
+
public function findByEmail($email, Syj_Model_User $user) {
$table = $this->getDbTable();
$select = $table->select()->where('email = ?', (string)$email);