Skip to content

Instantly share code, notes, and snippets.

@flack
Created June 15, 2011 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flack/1026811 to your computer and use it in GitHub Desktop.
Save flack/1026811 to your computer and use it in GitHub Desktop.
CODE:
midgard_connection::get_instance()->set_loglevel('debug');
$qb = new midgard_query_builder('midgard_user');
$qb->add_constraint('person', '=', $this->_person->guid);
$qb->add_constraint('authtype', '=', $GLOBALS['midcom_config']['auth_type']);
$result = $qb->execute();
midgard_connection::get_instance()->set_loglevel('warn');
LOGFILE:
midgard-core (pid:7702):(debug): midgard_query_builder::__construct(...)
midgard-core (pid:7702):(debug): midgard_query_builder::add_constraint(...)
midgard-core (pid:7702):(debug): midgard_query_builder::add_constraint(...)
midgard-core (pid:7702):(debug): midgard_query_builder::execute(...)
midgard-core (pid:7702):(debug):Model query = SELECT guid AS guid, login AS login, password AS password, person_guid AS person, active AS active, auth_type AS authtype, auth_type_id AS authtypeid, user_type AS usertype FROM midgard_user WHERE `midgard_user`.`person_guid` = '4019aca638e811e0a80129fd6541abceabce' AND `midgard_user`.`auth_type` = 'Plaintext'
(process:7702): GLib-GObject-CRITICAL **: g_value_get_boolean: assertion `G_VALUE_HOLDS_BOOLEAN (value)' failed
midgard-core (pid:7702):(debug): midgard_connection::set_loglevel(...)
SQL:
+--------------------------------------+----------------------------------+---------------------+--------------------------------------+--------+-----------+------------+----------+
| guid | login | password | person | active | authtype | authtypeid | usertype |
+--------------------------------------+----------------------------------+---------------------+--------------------------------------+--------+-----------+------------+----------+
| 402bf41038e811e0a80129fd6541abceabce | openpsa_testcase user 1297763098 | password_1297763098 | 4019aca638e811e0a80129fd6541abceabce | 0 | Plaintext | 2 | 0 |
+--------------------------------------+----------------------------------+---------------------+--------------------------------------+--------+-----------+------------+----------+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment