[TYPO3-english] [Polluriel potentiel] More than one fe_users records with the same username possible?
jean-sebastien_gervais at ssss.gouv.qc.ca
jean-sebastien_gervais at ssss.gouv.qc.ca
Tue Dec 18 16:04:10 CET 2012
Hello Roland
According to the TCA, fe_users.username is unique by page id (TYPO3
4.5.x) and the only unique constraint in the database is the uid.
in other word, I guess that removing uniqueInPid in the TCA in this line
would fix the issue for you. add it to extTables.php :
$TCA['fe_users']['columns']['username']['config']['eval'] =
'nospace,lower,uniqueInPid,required';
For the unique user/password combination, I don't think it is possible
directly in the TCA, although you can use a user_func with the eval
section, exemple:
$TCA['fe_users']['columns']['username']['config']['eval'] = '
tx_exampleextraevaluations_extraeval1'
«You can supply your own form evaluations in an extension by creating a
class with two functions,
one which returns the JavaScript code for client side validation called
returnFieldJS()
and one which does the server side validation called evaluateFieldValue().
The function evaluateFieldValue() has 3 arguments:
1. $value :The field value to be evaluated.
2. $is_in : The "is_in" value of the field configuration from TCA
(see below).
3. &$set : Boolean defining if the value is written to the database
or not. Must be passed by reference and changed if needed.
Example:
class.tx_exampleextraevaluations_extraeval1.php:
<?php
class tx_exampleextraevaluations_extraeval1 {
function returnFieldJS() {
return ' return value + " [added by JS]"; ';
}
function evaluateFieldValue($value, $is_in, &$set) {
return $value . ' [added by PHP]';
}
}
?>
»
http://typo3.org/documentation/document-library/core-documentation/doc_core_tca/4.7.1/view/1/3/
Hope this helps!
Jean-Sebastien Gervais
typo3-english-bounces at lists.typo3.org a écrit sur 2012-12-18 09:00:53 :
> De : Roland <most.wanted at gmx.at>
> A : typo3-english at lists.typo3.org
> Date : 2012-12-18 09:05
> Objet : [Polluriel potentiel] [TYPO3-english] More than one
> fe_users records with the same username possible?
> Envoyé par : typo3-english-bounces at lists.typo3.org
>
> hi everybody,
>
> is it somehow possible to use the same username for more than one
> fe_users? the username-password combination would be unique.
>
> kind regards
>
> roland
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
More information about the TYPO3-english
mailing list