i created own (typo3 6.2) extension extension builder extend fe_users , working fine able use showaction based on username instead of uid of user.
the goal able call controller on frontend this:
my.domain.com/users?tx_crilcq_crilcqmember[username]=johndoe&tx_crilcq_crilcqmember[action]=show
instead of this:
my.domain.com/users?tx_crilcq_crilcqmember[member]=2&tx_crilcq_crilcqmember[action]=show
at first thought had modify extended repository (class memberrepository extends \typo3\cms\extbase\persistence\repository) seems used requests returning array of entries , not reference single instance. don't know if i'm right feeling thing need modify somewhere else.
any clue someone?
an extbase repository has magic methods findby[property], findoneby[property] , countby[property], returns/counts objects given property.
you can change show action shown below:
/** * @param string $username * @return void */ public function showaction($username) { $user = $this->memberclassrepository->findonebyusername($username); $this->view->assign('user', $user); }
Comments
Post a Comment