- Symphony 2.2.1
-
› boot
9 -
› core
22 -
› email-gateways
3 -
› toolkit
66 -
› Unknown
33 - Delegates83
- Deprecated30
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class Author
class.author.php #9The Author class represents a Symphony Author object. Authors are the backend users in Symphony.
Methods
integer|boolean commit()
This is the insert method for the Author. This takes the current
$this->_fields
values and adds them to the database using either the
AuthorManager::edit
or AuthorManager::add
functions. An
existing user is determined by if an ID is already set.
Returns
When a new Author is added or updated, an integer of the Author ID will be returned, otherwise false will be returned for a failed update.
See Also
string createAuthToken()
Creates an author token using the General::hash
function and the
current Author's username and password. The default hash function
is SHA1
See Also
mixed get(
$field)
Retrieves the value from the Author object by field from $this->_fields
array. If field is omitted, all fields are returned.
Parameters
Returns
If the field is not set or is empty, returns null. If the field is not provided, returns the $this->_fields
array Otherwise returns a string.
string getFullName()
A convenience method that returns an Authors full name
boolean isDeveloper()
Returns boolean if the current Author is of the developer user type.
boolean isPrimaryAccount()
Returns boolean if the current Author is the original creator of this Symphony installation.
boolean isTokenActive()
Returns boolean if the current Author's authentication token is active or not.
boolean loadAuthor(
$id)
This function will load an Author by ID into the current Author object
Parameters
See Also
Deprecated
This function will be removed in the next major release. The AuthorManager::fetchByID is the preferred way to find Authors by ID.
boolean loadAuthorFromUsername(
$username, $usernames)
This function will load an Author by Username into the current Author object
Parameters
See Also
Deprecated
This function will be removed in the next major release. The AuthorManager::fetchByUsername
is the preferred way to find Authors by Username.
void remove(
$field)
Given a field, remove it from $this->_fields
Parameters
void set(
$field, $value)
Stores a key=>value pair into the Author object's $this->_fields
array.
Parameters
boolean validate(
$errors)
Prior to saving an Author object, the validate function ensures that
the values in $this->_fields
array are correct. The function returns
boolean, but an errors array is provided by reference to the callee
function.
boolean verifyToken(
$token)
This function compares a given token to an Author's actual token.
Parameters
Deprecated
This function will be removed in the next major release. It is unused by Symphony.