<?php

$a = '[quote author=XXXX link=topic=137308.msg208143#msg208143 date=1389302491]foo bar bar foo[/quote]';

echo preg_replace("/\[quote\s+author=(\w+)[^\]]*]/g", "[quote=$1]", $a);