Welcome Guest, Not a member yet? Register   Sign In
error on function call
#1

(This post was last modified: 04-19-2021, 06:39 AM by richb201.)

I am seeing something strange here (or perhaps I am having a senior moment?) For some reason my call to 
passwordless_login_admin($email,$id);

is coming up with the error below. Can someone tell me what is going on? 



PHP Code:
TypeError

Message
Call to undefined function passwordless_login_admin()

Filename: /app/application/controllers/Users_start_login.php 


PHP Code:
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require 
'vendor/autoload.php';


class 
Users_start_login extends CI_Controller {

    function __construct() {
        parent::__construct();
        $this->load->library('form_validation');
        $this->load->library('session');
        $this->load->helper(array('form''url'));
 
//       $this->load->database();
        $this->output->set_template('default3_passwordless');
        $this->_init();
    }

    private function _init()
    {
        $this->load->js('assets/themes/default/js/jquery-1.9.1.min.js');
        $this->load->js('assets/themes/default/hero_files/bootstrap-transition.js');
        $this->load->js('assets/themes/default/hero_files/bootstrap-collapse.js');
        //load up data needed for fa
        $_SESSION['apiKey'] = getenv('apiKey');
        $_SESSION['applicationID_survey'] = getenv('applicationID_survey');
        $_SESSION['applicationID_login'] = getenv('applicationID_login');
        $_SESSION['applicationID_admin_login'] = getenv('applicationID_admin_login');
        $_SESSION['applicationID_admin_register_login'] = getenv('applicationID_admin_register_login');  //this is for both register and login
        $_SESSION['emailTemplate'] = getenv('emailTemplate');
        $_SESSION['tenantID_survey'] = getenv('tenantID_survey');
        $_SESSION['tenantID_login'] = getenv('tenantID_login');

        $_SESSION['client'] = new FusionAuth\FusionAuthClient($_SESSION['apiKey'], "http://fusionauth:9011");
    }

    public function get_email()
    {
        $id=0;
        $email=html_escape($_POST['email']);
        passwordless_login_admin($email,$id);
    
        
if (isset($email)) {
            if (!filter_var($emailFILTER_VALIDATE_EMAIL)) {
                $emailErr "Invalid email format";
            }
        }
    }


    public function passwordless_login_admin($email,$id)
    {
        //start the passwordless
        
....

    } 
proof that an old dog can learn new tricks
Reply


Messages In This Thread
error on function call - by richb201 - 04-19-2021, 06:36 AM
RE: error on function call - by richb201 - 04-19-2021, 01:28 PM
RE: error on function call - by vitnibel - 04-19-2021, 06:51 PM
RE: error on function call - by richb201 - 04-19-2021, 09:00 PM
RE: error on function call - by vitnibel - 04-19-2021, 09:40 PM
RE: error on function call - by richb201 - 04-19-2021, 09:56 PM
RE: error on function call - by InsiteFX - 04-20-2021, 11:44 AM
RE: error on function call - by hamishheney5 - 06-09-2021, 04:54 AM
RE: error on function call - by ashwinjio - 02-25-2022, 01:51 PM
RE: error on function call - by dervisvid - 04-12-2022, 12:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB