return '';
}
- if (Cookie::v('domain', 'login') != 'alias') {
- return XDB::fetchOneCell('SELECT email
- FROM email_source_account
- WHERE uid = {?} AND type != \'alias_aux\' AND FIND_IN_SET(\'bestalias\', flags)',
- $id);
- } else {
- return XDB::fetchOneCell('SELECT email
- FROM email_source_account
- WHERE uid = {?} AND type = \'alias_aux\'',
- $id);
- }
-
- return '';
+ $user = User::getSilentWithUID($id);
+ return $user->bestEmail();
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: