TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
FrontendLoginController Class Reference
Inheritance diagram for FrontendLoginController:
AbstractPlugin

Public Member Functions

 main ($content, $conf)
 
- Public Member Functions inherited from AbstractPlugin
 pi_setPiVarDefaults ()
 
 pi_getPageLink ($id, $target= '', $urlParameters=array())
 
 pi_linkToPage ($str, $id, $target= '', $urlParameters=array())
 
 pi_linkTP ($str, $urlParameters=array(), $cache=false, $altPageId=0)
 
 pi_linkTP_keepPIvars ($str, $overrulePIvars=array(), $cache=false, $clearAnyway=false, $altPageId=0)
 
 pi_linkTP_keepPIvars_url ($overrulePIvars=array(), $cache=false, $clearAnyway=false, $altPageId=0)
 
 pi_list_linkSingle ($str, $uid, $cache=false, $mergeArr=array(), $urlOnly=false, $altPageId=0)
 
 pi_openAtagHrefInJSwindow ($str, $winName= '', $winParams= 'width=670, height=500, status=0, menubar=0, scrollbars=1, resizable=1')
 
 pi_list_browseresults ($showResultCount=1, $tableParams= '', $wrapArr=array(), $pointerName= 'pointer', $hscText=true, $forceOutput=false)
 
 pi_list_searchBox ($tableParams= '')
 
 pi_list_modeSelector ($items=array(), $tableParams= '')
 
 pi_list_makelist ($res, $tableParams= '')
 
 pi_list_row ($c)
 
 pi_list_header ()
 
 pi_getClassName ($class)
 
 pi_classParam ($class, $addClasses= '')
 
 pi_wrapInBaseClass ($str)
 
 pi_getEditPanel ($row=array(), $tablename= '', $label= '', $conf=array())
 
 pi_getEditIcon ($content, $fields, $title= '', $row=array(), $tablename= '', $oConf=array())
 
 pi_getLL ($key, $alternativeLabel= '', $hsc=false)
 
 pi_exec_query ($table, $count=false, $addWhere= '', $mm_cat= '', $groupBy= '', $orderBy= '', $query= '')
 
 pi_getRecord ($table, $uid, $checkPage=false)
 
 pi_getPidList ($pid_list, $recursive=0)
 
 pi_prependFieldsWithTable ($table, $fieldList)
 
 pi_getCategoryTableContents ($table, $pid, $whereClause= '', $groupBy= '', $orderBy= '', $limit= '')
 
 pi_isOnlyFields ($fList, $lowerThan=-1)
 
 pi_autoCache ($inArray)
 
 pi_RTEcssText ($str)
 
 pi_initPIflexForm ($field= 'pi_flexform')
 
 pi_getFFvalue ($T3FlexForm_array, $fieldName, $sheet= 'sDEF', $lang= 'lDEF', $value= 'vDEF')
 
 pi_getFFvalueFromSheetArray ($sheetArray, $fieldNameArr, $value)
 

Public Attributes

 $prefixId = 'tx_felogin_pi1'
 
 $extKey = 'felogin'
 
 $pi_checkCHash = false
 
 $pi_USER_INT_obj = true
 
 $spid
 
 $referer
 
- Public Attributes inherited from AbstractPlugin
 $cObj
 
 $prefixId
 
 $scriptRelPath
 
 $extKey
 
 $piVars
 
 $internal = array('res_count' => 0, 'results_at_a_time' => 20, 'maxPages' => 10, 'currentRow' => array(), 'currentTable' => '')
 
 $LOCAL_LANG = array()
 
 $LOCAL_LANG_charset = array()
 
 $LOCAL_LANG_loaded = 0
 
 $LLkey = 'default'
 
 $altLLkey = ''
 
 $LLtestPrefix = ''
 
 $LLtestPrefixAlt = ''
 
 $pi_isOnlyFields = 'mode,pointer'
 
 $pi_alwaysPrev = 0
 
 $pi_lowerThan = 5
 
 $pi_moreParams = ''
 
 $pi_listFields = '*'
 
 $pi_autoCacheFields = array()
 
 $pi_autoCacheEn = 0
 
 $pi_USER_INT_obj = false
 
 $pi_checkCHash = false
 
 $conf = array()
 
 $pi_EPtemp_cObj
 
 $pi_tmpPageId = 0
 

Protected Member Functions

 showForgot ()
 
 changePassword ()
 
 generateAndSendHash ($user)
 
 showLogout ()
 
 showLogin ()
 
 processRedirect ()
 
 mergeflexFormValuesIntoConf ()
 
 flexFormValue ($var, $sheet)
 
 getPageLink ($label, $piVars, $returnUrl=false)
 
 getPreserveGetVars ()
 
 generatePassword ($len)
 
 getDisplayText ($label, $stdWrapArray=array())
 
 getUserFieldMarkers ()
 
 validateRedirectUrl ($url)
 
 isInCurrentDomain ($url)
 
 isInLocalDomain ($url)
 
 isRelativeUrl ($url)
 
- Protected Member Functions inherited from AbstractPlugin
 applyStdWrapRecursive (array $conf, $level=0)
 

Protected Attributes

 $userIsLoggedIn
 
 $template
 
 $uploadDir
 
 $redirectUrl
 
 $noRedirect = false
 
 $logintype
 
- Protected Attributes inherited from AbstractPlugin
 $LOCAL_LANG_UNSET = array()
 
 $frontendController
 
 $databaseConnection
 

Detailed Description

Plugin 'Website User Login' for the 'felogin' extension.

Definition at line 23 of file FrontendLoginController.php.

Member Function Documentation

changePassword ( )
protected

This function checks the hash from link and checks the validity. If it's valid it shows the form for changing the password and process the change of password after submit, if not valid it returns the error message

Returns
string The content.

Definition at line 289 of file FrontendLoginController.php.

References $GLOBALS, FrontendLoginController\$spid, GeneralUtility\_POST(), GeneralUtility\callUserFunction(), elseif, FrontendLoginController\getDisplayText(), FrontendLoginController\getPageLink(), AbstractPlugin\pi_getLL(), and AbstractPlugin\pi_getRecord().

Referenced by FrontendLoginController\main().

flexFormValue (   $var,
  $sheet 
)
protected

Loads a variable from the flexform

Parameters
string$varName of variable
string$sheetName of sheet
Returns
string Value of var

Definition at line 821 of file FrontendLoginController.php.

References AbstractPlugin\pi_getFFvalue().

Referenced by FrontendLoginController\getDisplayText(), FrontendLoginController\mergeflexFormValuesIntoConf(), and FrontendLoginController\showLogout().

generateAndSendHash (   $user)
protected

Generates a hashed link and send it with email

Parameters
array$userContains user data
Returns
string Empty string with success, error message with no success

Definition at line 396 of file FrontendLoginController.php.

References $GLOBALS, GeneralUtility\callUserFunction(), elseif, GeneralUtility\generateRandomBytes(), GeneralUtility\locationHeaderUrl(), AbstractPlugin\pi_getLL(), and AbstractPlugin\pi_getPageLink().

Referenced by FrontendLoginController\showForgot().

generatePassword (   $len)
protected

Is used by forgot password - function with md5 option.

Parameters
int$lenLength of new password
Returns
string New password

Definition at line 892 of file FrontendLoginController.php.

Referenced by FrontendLoginController\showForgot().

getDisplayText (   $label,
  $stdWrapArray = array() 
)
protected

Returns the header / message value from flexform if present, else from locallang.xlf

Parameters
string$labellabel name
array$stdWrapArrayTS stdWrap array
Returns
string label text

Definition at line 913 of file FrontendLoginController.php.

References FrontendLoginController\flexFormValue(), FrontendLoginController\getUserFieldMarkers(), and AbstractPlugin\pi_getLL().

Referenced by FrontendLoginController\changePassword(), FrontendLoginController\showForgot(), FrontendLoginController\showLogin(), and FrontendLoginController\showLogout().

getPageLink (   $label,
  $piVars,
  $returnUrl = false 
)
protected

Generate link with typolink function

Parameters
string$labelLinktext
array$piVarsLink vars
bool$returnUrlTRUE: returns only url FALSE (default) returns the link)
Returns
string Link or url

Definition at line 834 of file FrontendLoginController.php.

References AbstractPlugin\$piVars, and FrontendLoginController\getPreserveGetVars().

Referenced by FrontendLoginController\changePassword(), FrontendLoginController\showForgot(), FrontendLoginController\showLogin(), and FrontendLoginController\showLogout().

getPreserveGetVars ( )
protected

Add additional parameters for links according to TS setting preserveGETvars. Possible values are "all" or a comma separated list of allowed GET-vars. Supports multi-dimensional GET-vars. Some hardcoded values are dropped.

Returns
string additionalParams-string

Definition at line 865 of file FrontendLoginController.php.

References GeneralUtility\_GET(), GeneralUtility\explodeUrl2Array(), GeneralUtility\implodeArrayForUrl(), and GeneralUtility\trimExplode().

Referenced by FrontendLoginController\getPageLink().

getUserFieldMarkers ( )
protected

Returns Array of markers filled with user fields

Returns
array Marker array

Definition at line 925 of file FrontendLoginController.php.

References GeneralUtility\strtoupper().

Referenced by FrontendLoginController\getDisplayText(), FrontendLoginController\showForgot(), FrontendLoginController\showLogin(), and FrontendLoginController\showLogout().

isInCurrentDomain (   $url)
protected

Determines whether the URL is on the current host and belongs to the current TYPO3 installation. The scheme part is ignored in the comparison.

Parameters
string$urlURL to be checked
Returns
bool Whether the URL belongs to the current TYPO3 installation

Definition at line 974 of file FrontendLoginController.php.

References $url, StringUtility\beginsWith(), and GeneralUtility\getIndpEnv().

Referenced by FrontendLoginController\validateRedirectUrl().

isInLocalDomain (   $url)
protected

Determines whether the URL matches a domain in the sys_domain database table.

Parameters
string$urlAbsolute URL which needs to be checked
Returns
bool Whether the URL is considered to be local

Definition at line 989 of file FrontendLoginController.php.

References $url, GeneralUtility\isFirstPartOfStr(), and GeneralUtility\isValidUrl().

Referenced by FrontendLoginController\validateRedirectUrl().

isRelativeUrl (   $url)
protected

Determines whether the URL is relative to the current TYPO3 installation.

Parameters
string$urlURL which needs to be checked
Returns
bool Whether the URL is considered to be relative

Definition at line 1021 of file FrontendLoginController.php.

References $url, GeneralUtility\getIndpEnv(), and GeneralUtility\isFirstPartOfStr().

Referenced by FrontendLoginController\validateRedirectUrl().

main (   $content,
  $conf 
)
mergeflexFormValuesIntoConf ( )
protected

Reads flexform configuration and merge it with $this->conf

Returns
void

Definition at line 768 of file FrontendLoginController.php.

References FrontendLoginController\flexFormValue(), and AbstractPlugin\pi_getPidList().

Referenced by FrontendLoginController\main().

processRedirect ( )
protected

Process redirect methods. The function searches for a redirect url using all configured methods.

Returns
array Redirect URLs

Definition at line 630 of file FrontendLoginController.php.

References $GLOBALS, FrontendLoginController\$redirectUrl, FrontendLoginController\$referer, $url, GeneralUtility\callUserFunction(), elseif, AbstractPlugin\pi_getPageLink(), and GeneralUtility\trimExplode().

Referenced by FrontendLoginController\main().

showForgot ( )
protected
showLogin ( )
protected
showLogout ( )
protected
validateRedirectUrl (   $url)
protected

Returns a valid and XSS cleaned url for redirect, checked against configuration "allowedRedirectHosts"

Parameters
string$url
Returns
string cleaned referer or empty string if not valid

Definition at line 946 of file FrontendLoginController.php.

References $url, FrontendLoginController\isInCurrentDomain(), FrontendLoginController\isInLocalDomain(), FrontendLoginController\isRelativeUrl(), AbstractPlugin\pi_getLL(), GeneralUtility\removeXSS(), and GeneralUtility\SYSLOG_SEVERITY_WARNING.

Referenced by FrontendLoginController\main().

Member Data Documentation

$extKey = 'felogin'

Definition at line 37 of file FrontendLoginController.php.

$logintype
protected

Definition at line 89 of file FrontendLoginController.php.

$noRedirect = false
protected

Definition at line 82 of file FrontendLoginController.php.

$pi_checkCHash = false

Definition at line 42 of file FrontendLoginController.php.

$pi_USER_INT_obj = true

Definition at line 47 of file FrontendLoginController.php.

$prefixId = 'tx_felogin_pi1'
$redirectUrl
protected
$referer
$spid
$template
protected

Definition at line 61 of file FrontendLoginController.php.

$uploadDir
protected

Definition at line 68 of file FrontendLoginController.php.

$userIsLoggedIn
protected

Definition at line 54 of file FrontendLoginController.php.

Referenced by FrontendLoginController\main().