PHP Class Newscoop\Services\Auth\DoctrineAuthService

Deprecation: in 4.3, will be removed in 4.4
Inheritance: implements Zend_Auth_Adapter_Interface
Show file Open project: sourcefabric/newscoop

Protected Properties

Property Type Description
$em Doctrine\ORM\EntityManager
$email string
$is_admin boolean
$is_external boolean
$password string
$username string

Public Methods

Method Description
__construct ( EntityManager $em )
authenticate ( ) : Zend_Auth_Result Perform authentication attempt
findByCredentials ( string $email, string $password ) : Newscoop\Entity\User Find by credentials
setAdmin ( boolean $admin = true ) : Newscoop\Services\AuthService Set is admin constrain
setEmail ( string $email ) : Newscoop\Services\AuthService Set email
setExternal ( boolean $external = true ) : Newscoop\Services\AuthService Set is external constrain
setPassword ( string $password ) : Newscoop\Services\Auth\DoctrineAuthService Set password
setUsername ( string $username ) : Newscoop\Services\Auth\DoctrineAuthService Set username

Method Details

__construct() public method

public __construct ( EntityManager $em )
$em Doctrine\ORM\EntityManager

authenticate() public method

Perform authentication attempt
public authenticate ( ) : Zend_Auth_Result
return Zend_Auth_Result

findByCredentials() public method

Find by credentials
public findByCredentials ( string $email, string $password ) : Newscoop\Entity\User
$email string
$password string
return Newscoop\Entity\User

setAdmin() public method

Set is admin constrain
public setAdmin ( boolean $admin = true ) : Newscoop\Services\AuthService
$admin boolean
return Newscoop\Services\AuthService

setEmail() public method

Set email
public setEmail ( string $email ) : Newscoop\Services\AuthService
$email string
return Newscoop\Services\AuthService

setExternal() public method

Set is external constrain
public setExternal ( boolean $external = true ) : Newscoop\Services\AuthService
$external boolean
return Newscoop\Services\AuthService

setPassword() public method

Set password
public setPassword ( string $password ) : Newscoop\Services\Auth\DoctrineAuthService
$password string
return Newscoop\Services\Auth\DoctrineAuthService

setUsername() public method

Set username
public setUsername ( string $username ) : Newscoop\Services\Auth\DoctrineAuthService
$username string
return Newscoop\Services\Auth\DoctrineAuthService

Property Details

$em protected property

protected EntityManager,Doctrine\ORM $em
return Doctrine\ORM\EntityManager

$email protected property

protected string $email
return string

$is_admin protected property

protected bool $is_admin
return boolean

$is_external protected property

protected bool $is_external
return boolean

$password protected property

protected string $password
return string

$username protected property

protected string $username
return string