library/Garp/Auth/Adapter/Passwordless.php
public function createOrUpdateAuthRecord($userId) {
        $token = $this->_getToken($userId);
        $authPwlessModel = new Model_AuthPasswordless();
        $select = $authPwlessModel->select()->where('user_id = ?', $userId);
        if ($authRecord = $authPwlessModel->fetchRow($select)) {
            $authPwlessModel->update(
                array(
                    'token' => $token,
                    'token_expiration_date' => $this->_getExpirationDate(),
                    'claimed' => 0
                ), 'id = ' . $authRecord->id
            );
            return $token;
        }
        $authPwlessModel->insert(
            array(
                'user_id' => $userId,
                'token' => $token,
                'token_expiration_date' => $this->_getExpirationDate()
            )
        );
        return $token;
    }
public function createOrUpdateAuthRecord($userId) {
        $token = $this->_getToken($userId);
        $authPwlessModel = new Model_AuthPasswordless();
        $select = $authPwlessModel->select()->where('user_id = ?', $userId);
        if ($authRecord = $authPwlessModel->fetchRow($select)) {
            $authPwlessModel->update(
                array(
                    'token' => $token,
                    'token_expiration_date' => $this->_getExpirationDate(),
                    'claimed' => 0
                ), 'id = ' . $authRecord->id
            );
            return $token;
        }
        $authPwlessModel->insert(
            array(
                'user_id' => $userId,
                'token' => $token,
                'token_expiration_date' => $this->_getExpirationDate()
            )
        );
        return $token;
    }
public function createOrUpdateAuthRecord ( $ userId ) { $ token = $ this -> _getToken ( $ userId ) ; $ authPwlessModel = new Model_AuthPasswordless ( ) ; $ select = $ authPwlessModel -> select ( ) -> where ( 'user_id = ?' , $ userId ) ; if ( $ authRecord = $ authPwlessModel -> fetchRow ( $ select ) ) { $ authPwlessModel -> update ( array ( 'token' => $ token , 'token_expiration_date' => $ this -> _getExpirationDate ( ) , 'claimed' => 0 ) , 'id = ' . $ authRecord -> id ) ; return $ token ; } $ authPwlessModel -> insert ( array ( 'user_id' => $ userId , 'token' => $ token , 'token_expiration_date' => $ this -> _getExpirationDate ( ) ) ) ; return $ token ; }
Create auth record containing the token a user can log in with

@param int $userId
@return string The token
Create auth record containing the token a user can log in with