- Symphony 2.6.11
-
› assets
14 -
› boot
14 -
› core
23 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
59 -
› interface
9 -
› toolkit
59 - Delegates92
- Deprecated27
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 Cryptography::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 isAuthor()
Returns boolean if the current Author is of the author user type.
boolean isDeveloper()
Returns boolean if the current Author is of the developer user type.
boolean isManager()
Returns boolean if the current Author is of the manager 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.
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. As of Symphony 2.3
Authors must have unique username AND email address. This function returns
boolean, with an $errors
array provided by reference to the callee
function.