1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 21:54:00 +02:00

[feature/avatars] Support proper avatar deletion, stub ACP

Fixing avatar deletion in the UCP and ACP, and stubbing the ACP
configuration page. I'll admit I kind of got caught carried away, so
this really should be a couple separate commits.

PHPBB3-10018
This commit is contained in:
Cullen Walsh
2011-04-20 23:14:38 -07:00
committed by Cullen Walsh
parent 611a1d647a
commit 84099e5bc1
11 changed files with 130 additions and 81 deletions

View File

@@ -121,6 +121,22 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
);
}
/**
* @inheritdoc
*/
public function delete($user_row)
{
$ext = substr(strrchr($user_row['user_avatar'], '.'), 1);
$filename = $this->phpbb_root_path . $this->config['avatar_path'] . '/' . $this->config['avatar_salt'] . '_' . $user_row['user_id'] . '.' . $ext;
if (file_exists($filename))
{
@unlink($filename);
}
return true;
}
/**
* @TODO
*/