aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-19 19:09:58 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-19 19:09:58 -0700
commitc3fd5ed73202f4dd17dda87ac968b0db4f44d423 (patch)
tree353a6394ebb8ea8eddd0f8dc862fa7d09a3ee0b1 /mod/profile.php
parent6695b4a203ab03941c8b3305a3e55cc02b85a5ac (diff)
downloadvolse-hubzilla-c3fd5ed73202f4dd17dda87ac968b0db4f44d423.tar.gz
volse-hubzilla-c3fd5ed73202f4dd17dda87ac968b0db4f44d423.tar.bz2
volse-hubzilla-c3fd5ed73202f4dd17dda87ac968b0db4f44d423.zip
one true profile photo, force nicknames
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 5cd13d596..db538750d 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -1,11 +1,7 @@
<?php
if(! function_exists('profile_load')) {
-function profile_load(&$a,$uid,$profile = 0) {
-
- $sql_extra = (($uid) && (intval($uid))
- ? " WHERE `user`.`uid` = " . intval($uid)
- : " WHERE `user`.`nickname` = '" . dbesc($uid) . "' " );
+function profile_load(&$a, $username, $profile = 0) {
if(remote_user()) {
$r = q("SELECT `profile-id` FROM `contact` WHERE `id` = %d LIMIT 1",
@@ -23,7 +19,8 @@ function profile_load(&$a,$uid,$profile = 0) {
$r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `user`.* FROM `profile`
LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid`
- $sql_extra $sql_which LIMIT 1"
+ WHERE `user`.`nickname` = '%s' $sql_which LIMIT 1",
+ dbesc($username)
);
if(($r === false) || (! count($r))) {