mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
need to allow account_lid string as parameter for accounts::id2name(), it is used in many places
This commit is contained in:
parent
1d519c4834
commit
1d743830c9
@ -591,12 +591,16 @@ class accounts
|
|||||||
*
|
*
|
||||||
* Uses the read method to fetch all data.
|
* Uses the read method to fetch all data.
|
||||||
*
|
*
|
||||||
* @param int $account_id numerica account_id
|
* @param int|string $account_id numeric account_id or account_lid
|
||||||
* @param string $which='account_lid' type to convert to: account_lid (default), account_email, ...
|
* @param string $which='account_lid' type to convert to: account_lid (default), account_email, ...
|
||||||
* @return string|boolean converted value or false on error ($account_id not found)
|
* @return string|boolean converted value or false on error ($account_id not found)
|
||||||
*/
|
*/
|
||||||
static function id2name($account_id, $which='account_lid')
|
static function id2name($account_id, $which='account_lid')
|
||||||
{
|
{
|
||||||
|
if (!is_numeric($account_id) && !($account_id = self::getInstance()->name2id($account_id)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
if (!($data = self::cache_read($account_id))) return false;
|
if (!($data = self::cache_read($account_id))) return false;
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,7 @@ class accounts_ldap
|
|||||||
|
|
||||||
if (!$members) $members = $this->members($data['account_id']);
|
if (!$members) $members = $this->members($data['account_id']);
|
||||||
$to_write[$forward] = array();
|
$to_write[$forward] = array();
|
||||||
foreach ($members as $member)
|
foreach ($members as $member => $account_lid)
|
||||||
{
|
{
|
||||||
if (($email = $this->id2name($member,'account_email')))
|
if (($email = $this->id2name($member,'account_email')))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user