[TYPO3-english] simple auth service - check for valid login

Sacha Vorbeck vorbeck at TYPO3Tutor.de
Thu Nov 12 14:37:03 CET 2009


Hi,

I read about authentification services and was able to authentificate a 
fe_user against an external database. But I fail to code an auth service 
that simply calls the parent object to check for a valid login and then 
redirect the user to some URL.

I tried this:

	function authUser($user) {
			$loginData['username'] = $this->login['uname'];
			$loginData['uident'] = $this->login['uident'];

			$loginData = $this->pObj->processLoginData($loginData, 'normal');

			$OK = $this->compareUident($user, $loginData);
			echo $OK;
			//if ($OK) http-header redirect goes here:
		}


But $OK is always true/1, even if I enter an invalid login.

Can anyone help me with this? I just need the line of code that tells 
me, if the entered login matches an existing user (in other words: is 
valid) or not.

-- 
thank you - all the best,
Sacha


More information about the TYPO3-english mailing list