[buddypress-trac] [BuddyPress Trac] #4369: Buddy Press Functions returning blank
buddypress-trac
noreply at wordpress.org
Sun Feb 4 18:36:48 UTC 2024
#4369: Buddy Press Functions returning blank
--------------------------+---------------------------------
Reporter: miasua | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Core | Version: 1.5.6
Severity: normal | Resolution: no action required
Keywords: |
--------------------------+---------------------------------
Comment (by majhes):
You can use the Membership.GetUser method, which takes the username. This
returns a MembershipUser object, which has an Email property. So,
something like this:
var user = Membership.GetUser(username);
var email = null;
if (user != null)
{
email = user.Email;
}
System.Web.Security moved to the System.Web.ApplicationServices assembly
in .NET 4.0 Framework, so you manually need to add a reference to that
assembly to access Membership.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4369#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list