FreeMoney.FreeMoneyModule.GetEmail C# (CSharp) Method

GetEmail() private method

private GetEmail ( UUID scope, UUID key, string &email ) : bool
scope UUID
key UUID
email string
return bool
        private bool GetEmail(UUID scope, UUID key, out string email)
        {
            if (m_usersemail.TryGetValue (key, out email))
                return !string.IsNullOrEmpty (email);

            if (!m_allowGridEmails)
                return false;

            m_log.Info ("[FreeMoney] Fetching email address from grid for " + key);

            IUserAccountService userAccountService = m_scenes[0].UserAccountService;
            UserAccount ua;

            ua = userAccountService.GetUserAccount (scope, key);

            if (ua == null)
                return false;

            if (string.IsNullOrEmpty (ua.Email))
                return false;

            // return email address found and cache it
            email = ua.Email;
            m_usersemail[ua.PrincipalID] = email;
            return true;
        }