PHP Class Newscoop\NewscoopBundle\Controller\PasswordRecoveryController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Mostra file Open project: sourcefabric/newscoop

Public Methods

Method Description
checkTokenAction ( Request $request )
generateRandomString ( integer $length = 12, string $allowedChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ) : string Get random string
indexAction ( Request $request )
sendToken ( $email, $token ) : void Sends email message with password reset token
setPassword ( User $user, string $password ) : void Set password
setPasswordResetToken ( User $user ) : string Generates token for given user

Method Details

checkTokenAction() public method

public checkTokenAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request

generateRandomString() public method

Get random string
public generateRandomString ( integer $length = 12, string $allowedChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ) : string
$length integer String length
$allowedChars string Chars allowed
return string

indexAction() public method

public indexAction ( Request $request )
$request Symfony\Component\HttpFoundation\Request

sendToken() public method

Sends email message with password reset token
public sendToken ( $email, $token ) : void
return void

setPassword() public method

Set password
public setPassword ( User $user, string $password ) : void
$user Newscoop\Entity\User User
$password string New user password
return void

setPasswordResetToken() public method

Generates token for given user
public setPasswordResetToken ( User $user ) : string
$user Newscoop\Entity\User User
return string