system check the registered email database, and log in to the related DB |
Hello, how do I make the following change in codeigniter, it's possible?
when logging into the system check the registered email database, and log in to the related database, for example: User: [email protected] Database: xyz User: [email protected] database: abc after login, this will be the user session database. I tried in many bad ways it does not work my function of verification email x database Code: function get_base_email($email) my database.php Code: $db['xyz'] = [ trying to set the database when signing in Code: $active_group = get_base_email($email);
@samuca.ti,
Are you sure that both database signons are working? Did you confirm it?
Yes, they are, and my function returns the database correctly.
Just do not know how to do the reload of the database, for the selected.
@samuca.ti,
Maybe this documentation will help you https://www.codeigniter.com/userguide3/d...-databases .
already tried,
can not update the $ db variable? I'm learning codeigniter, sorry. after login: I'm trying class Authentication extends CRM_Controller { ... ... runkit_constant_redefine ('APP_DB', get_base_email($email)); $this->db->close(); $this->db->db_select(APP_DB); $this->db->reconnect(); |
Welcome Guest, Not a member yet? Register Sign In |