|
Revision 14, 0.5 kB
(checked in by francois, 1 year ago)
|
added user profile
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
class sfGuardUserProfilePeer extends BasesfGuardUserProfilePeer |
|---|
| 11 |
{ |
|---|
| 12 |
public static function getNameFromUsername($username) |
|---|
| 13 |
{ |
|---|
| 14 |
$c = new Criteria(); |
|---|
| 15 |
$c->add(sfGuardUserPeer::USERNAME, $username); |
|---|
| 16 |
$c->addJoin(sfGuardUserPeer::ID, self::USER_ID); |
|---|
| 17 |
$profile = self::doSelectOne($c); |
|---|
| 18 |
if($profile) |
|---|
| 19 |
{ |
|---|
| 20 |
return $profile->__toString(); |
|---|
| 21 |
} |
|---|
| 22 |
else |
|---|
| 23 |
{ |
|---|
| 24 |
return $username; |
|---|
| 25 |
} |
|---|
| 26 |
} |
|---|
| 27 |
} |
|---|
| 28 |
|
|---|