CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #7488

No display user's avatar into "View profile" page

Added by Roman Savochenko about 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2010-04-27
Priority:Should have Due date:
Assignee:Martin Helmich % Done:

100%

Category:-
Target version:1.9.2
Votes: 0

Description

Into function tx_mmforum_pi1::view_profil
$user->hasAvatar() always return empty!

7488.patch (2 kB) Martin Tepper, 2010-05-11 11:43

Associated revisions

Revision 36302
Added by Martin Helmich almost 3 years ago

[#BUGFIX] Added date format for user settings form (fixes #7498)
[#BUGFIX] Fixed avatar display bug in user profile view (fixes #7488)

Revision a71af19f
Added by Martin Helmich almost 3 years ago

[#BUGFIX] Added date format for user settings form (fixes #7498)
[#BUGFIX] Fixed avatar display bug in user profile view (fixes #7488)

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/mm_forum/branches/1.9.x@36302 735d13b6-9817-0410-8766-e36946ffe9aa

Revision 7992666c
Added by Martin Helmich almost 3 years ago

[#BUGFIX] Added date format for user settings form (fixes #7498)
[#BUGFIX] Fixed avatar display bug in user profile view (fixes #7488)

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/mm_forum/trunk@36302 735d13b6-9817-0410-8766-e36946ffe9aa

History

Updated by Roman Savochenko about 3 years ago

The problem reproduced for avatar loading from tx_srfeuserregister module.
Fixed by add code to tx_mmforum_pi1::view_profil:

$marker['###AVATAR###'] = "";
if ($conf['path_avatar'] && $user->hasAvatar())
$marker['###AVATAR###'] = tx_mmforum_tools::res_img($conf['path_avatar'].$user->getAvatarFilename(),$conf['avatar_width'],$conf['avatar_height']);
else {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('image','fe_users','uid = "'.$user->getUid().'"');
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
if( $row['image'] ) {
if( strstr($row['image'],',' ) !== false ) {
$avatarArray = t3lib_div::trimExplode(',',$row['image']);
$row['image'] = $avatarArray0;
}
if( file_exists('uploads/pics/'.$row['image']) )
$marker['###AVATAR###'] = tx_mmforum_tools::res_img('uploads/pics/'.$row['image'],$conf['avatar_width'],$conf['avatar_height']);
elseif( file_exists('uploads/tx_srfeuserregister/'.$row['image']) )
$marker['###AVATAR###'] = tx_mmforum_tools::res_img('uploads/tx_srfeuserregister/'.$row['image'],$conf['avatar_width'],$conf['avatar_height']);
}
}

Updated by Martin Tepper about 3 years ago

Updated by Martin Helmich almost 3 years ago

  • Status changed from New to Accepted
  • Assignee set to Martin Helmich
  • Target version set to 1.9.2

Updated by Martin Helmich almost 3 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r36302.

Also available in: Atom PDF