Class: User

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/wpb/user.rb

Overview

This class is used for getting the user from the wordpress database

Examples:

User.find(1).name

The above will find the user with id of 1 and retrieve their display name

Instance Method Summary collapse

Instance Method Details

#emailObject

Grab the email of the selected user



50
51
52
# File 'lib/wpb/user.rb', line 50

def email
	user_email
end

#email=(email) ⇒ Object

Set the email of the selected user



57
58
59
# File 'lib/wpb/user.rb', line 57

def email= email
	self.user_email = email
end

#nameObject

Grab the name of the selected user



22
23
24
# File 'lib/wpb/user.rb', line 22

def name
	display_name
end

#name=(name) ⇒ Object

Set the name of the selected user



29
30
31
# File 'lib/wpb/user.rb', line 29

def name= name
	self.display_name = name
end

#usernameObject

Grab the username of the selected user



36
37
38
# File 'lib/wpb/user.rb', line 36

def username
	
end

#username=(username) ⇒ Object

Set the username of the selected user



43
44
45
# File 'lib/wpb/user.rb', line 43

def username= username
	self. = username
end