BAOBAB
co_andisol.class.php
Go to the documentation of this file.
1 <?php
2 /***************************************************************************************************************************/
26 defined( 'LGV_ANDISOL_CATCHER' ) or die ( 'Cannot Execute Directly' ); // Makes sure that this file is in the correct context.
27 
28 define('__ANDISOL_VERSION__', '1.1.2.3000');
29 
30 if (!defined('LGV_ACCESS_CATCHER')) {
31  define('LGV_ACCESS_CATCHER', 1);
32 }
33 
34 require_once(CO_Config::cobra_main_class_dir().'/co_cobra.class.php');
35 
36 if ( !defined('LGV_LANG_CATCHER') ) {
37  define('LGV_LANG_CATCHER', 1);
38 }
39 
40 require_once(CO_Config::andisol_lang_class_dir().'/common.inc.php');
41 
42 /****************************************************************************************************************************/
50 class CO_Andisol {
51  protected $_chameleon_instance = NULL;
52  protected $_cobra_instance = NULL;
53 
54  var $version;
55  var $error;
56 
57  /************************************************************************************************************************/
58  /*#################################################### INTERNAL METHODS ################################################*/
59  /************************************************************************************************************************/
60 
61  /***********************/
67  protected function _create_db_object( $in_classname,
68  $in_read_security_id = 1,
69  $in_write_security_id = NULL
70  ) {
71  $ret = NULL;
72  if ($this->logged_in()) {
73  $instance = $this->get_chameleon_instance()->make_new_blank_record($in_classname);
74 
75  if (isset($instance) && ($instance instanceof $in_classname)) {
76  // If we did not get a specific read security ID, then we assume 1.
77  if (!isset($in_read_security_id)) {
78  $in_read_security_id = 1;
79  }
80 
81  // If we did not get a specific write security ID, then we assume the logged-in user ID.
82  if (!isset($in_write_security_id) || !intval($in_write_security_id)) {
83  $in_write_security_id = $this->get_chameleon_instance()->get_login_id();
84  }
85 
86  if ($instance->set_read_security_id($in_read_security_id)) {
87  if ($instance->set_write_security_id($in_write_security_id)) {
88  $ret = $instance;
89  } elseif (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
90  if ($instance->error) {
91  $this->error = $instance->error;
92  }
93 
94  $instance->delete_from_db();
95  }
96  } elseif (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
97  if ($instance->error) {
98  $this->error = $instance->error;
99  }
100 
101  $instance->delete_from_db();
102  }
103  } elseif (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
104  if ($instance->error) {
105  $this->error = $instance->error;
106  }
107 
108  $instance->delete_from_db();
109  }
110  } else {
114  }
115 
116  return $ret;
117  }
118 
119  /***********************/
126  protected function _make_security_token() {
127  $ret = NULL;
128 
129  if ($this->manager()) {
130  $ret = $this->get_cobra_instance()->make_security_token();
131  if (0 == $ret) {
132  $ret = NULL;
133  }
134  } else {
138  }
139 
140  return $ret;
141  }
142 
143  /************************************************************************************************************************/
144  /***********************/
150  public function __construct( $in_login_string_id = NULL,
151  $in_hashed_password = NULL,
152  $in_raw_password = NULL,
153  $in_api_key = NULL
154  ) {
155  $this->class_description = 'The main model interface class.';
156  $this->version = __ANDISOL_VERSION__;
157  $this->error = NULL;
158 
159  // The first thing we do, is set up any login instance, as well as any possible COBRA instance.
160  $chameleon_instance = new CO_Chameleon($in_login_string_id, $in_hashed_password, $in_raw_password, $in_api_key);
161  if (isset($chameleon_instance) && ($chameleon_instance instanceof CO_Chameleon)) {
162  if ($chameleon_instance->valid) {
163  $this->_chameleon_instance = $chameleon_instance;
164 
165  $login_item = $chameleon_instance->get_login_item();
166 
167  // COBRA requires a manager (or God).
168  if (isset($login_item) && ($chameleon_instance->god_mode() || ($login_item instanceof CO_Login_Manager))) {
169  $cobra_instance = CO_Cobra::make_cobra($chameleon_instance);
170 
171  if (isset($cobra_instance) && ($cobra_instance instanceof CO_Cobra)) {
172  $this->_cobra_instance = $cobra_instance;
173  } elseif (isset($cobra_instance) && ($cobra_instance->error instanceof LGV_Error)) {
174  $this->error = $cobra_instance->error;
175  }
176  }
177  } elseif (isset($chameleon_instance) && ($chameleon_instance->error instanceof LGV_Error)) {
178  $this->error = $chameleon_instance->error;
179  }
180  }
181 
182  // At this point, we have (or have not) logged in, and any infrastructure for logged-in operations is in place.
183  }
184 
185  /************************************************************************************************************************/
186  /*############################################### COMPONENT ACCESS METHODS #############################################*/
187  /************************************************************************************************************************/
188 
189  /***********************/
193  public function get_cobra_instance() {
194  return $this->_cobra_instance;
195  }
196 
197  /***********************/
201  public function get_chameleon_instance() {
203  }
204 
205  /************************************************************************************************************************/
206  /*############################################# BASIC LOGIN STATUS QUERIES #############################################*/
207  /************************************************************************************************************************/
208 
209  /***********************/
213  public function valid() {
214  return (NULL != $this->get_chameleon_instance()) && ($this->get_chameleon_instance() instanceof CO_Chameleon);
215  }
216 
217  /***********************/
221  public function logged_in() {
222  return $this->valid() && ($this->get_chameleon_instance()->get_login_item() instanceof CO_Security_Login);
223  }
224 
225  /***********************/
229  public function manager() {
230  return $this->logged_in() && ($this->get_cobra_instance() instanceof CO_Cobra);
231  }
232 
233  /***********************/
237  public function god() {
238  return $this->manager() && $this->get_chameleon_instance()->god_mode();
239  }
240 
241  /***********************/
245  public function current_login() {
246  return $this->get_login_item();
247  }
248 
249  /***********************/
253  public function current_user() {
254  return $this->get_user_from_login();
255  }
256 
257  /***********************/
263  public function i_have_this_token( $in_token_to_test
264  ) {
265  return $this->get_chameleon_instance()->i_have_this_token($in_token_to_test);
266  }
267 
268  /************************************************************************************************************************/
269  /*################################################# USER ACCESS METHODS ################################################*/
270  /************************************************************************************************************************/
271 
272  /***********************/
280  public function get_login_item( $in_login_integer_id = NULL
281  ) {
282  $ret = NULL;
283 
284  if ($this->logged_in()) {
285  $ret = $this->get_chameleon_instance()->get_login_item($in_login_integer_id);
286  if (isset($this->get_chameleon_instance()->error)) {
287  $this->error = $this->get_chameleon_instance()->error;
288  }
289  }
290 
291  return $ret;
292  }
293 
294  /***********************/
302  public function get_login_item_by_login_string( $in_login_string_id
303  ) {
304  $ret = NULL;
305 
306  if ($this->logged_in()) {
307  $ret = $this->get_chameleon_instance()->get_login_item_by_login_string($in_login_string_id);
308 
309  if (isset($this->get_chameleon_instance()->error)) {
310  $this->error = $this->get_chameleon_instance()->error;
311  }
312  }
313 
314  return $ret;
315  }
316 
317  /***********************/
321  public function get_user_from_login_string( $in_login_string_id
322  ) {
323  $ret = NULL;
324 
325  $login_item = $this->get_login_item_by_login_string($in_login_string_id);
326 
327  if (isset($login_item) && ($login_item instanceof CO_Security_Login)) {
328  $ret = $this->get_user_from_login($login_item->id());
329  }
330 
331  return $ret;
332  }
333 
334  /***********************/
342  public function who_can_see( $in_test_target
343  ) {
344  $ret = Array();
345 
346  if ($this->manager()) { // Don't even bother unless we're a manager.
347  $ret = $this->get_cobra_instance()->who_can_see($in_test_target);
348 
349  $this->error = $this->get_cobra_instance()->error;
350  } else {
354  }
355 
356  return $ret;
357  }
358 
359  /***********************/
367  public function get_data_access_class_by_id( $in_id
368  ) {
369  $ret = NULL;
370 
371  if ($this->get_chameleon_instance()->can_i_see_this_data_record($in_id)) {
372  $ret = $this->get_chameleon_instance()->get_data_access_class_by_id($in_id);
373  if (isset($this->get_chameleon_instance()->error)) {
374  $this->error = $this->get_chameleon_instance()->error;
375  }
376  }
377 
378  return $ret;
379  }
380 
381  /***********************/
389  public function get_security_access_class_by_id( $in_id
390  ) {
391  $ret = $this->$this->get_chameleon_instance()->get_security_access_class_by_id($in_id);
392  if (isset($this->get_chameleon_instance()->error)) {
393  $this->error = $this->get_chameleon_instance()->error;
394  }
395 
396  return $ret;
397  }
398 
399  /************************************************************************************************************************/
400  /*################################################## DATA SEARCH METHODS ###############################################*/
401  /************************************************************************************************************************/
402 
403  /***********************/
481  public function generic_search( $in_search_parameters = NULL,
509  $or_search = false,
510  $page_size = 0,
511  $initial_page = 0,
512  $and_writeable = false,
513  $count_only = false,
514  $ids_only = false
515  ) {
516  $ret = $this->get_chameleon_instance()->generic_search($in_search_parameters, $or_search, $page_size, $initial_page, $and_writeable, $count_only, $ids_only);
517 
518  if (isset($this->get_chameleon_instance()->error)) {
519  $this->error = $this->get_chameleon_instance()->error;
520  }
521 
522  return $ret;
523  }
524 
525  /***********************/
533  public function location_search( $in_longitude_degrees,
534  $in_latitude_degrees,
535  $in_radius_kilometers,
536  $page_size = 0,
537  $initial_page = 0,
538  $and_writeable = false,
539  $count_only = false,
540  $ids_only = false
541  ) {
542  $ret = $this->generic_search(Array('location' => Array('longitude' => $in_longitude_degrees, 'latitude' => $in_latitude_degrees, 'radius' => $in_radius_kilometers)), false, $page_size, $initial_page, $and_writeable, $count_only, $ids_only);
543 
544  return $ret;
545  }
546 
547  /***********************/
551  public function get_all_users( $and_write = false
552  ) {
553  $ret = Array();
554 
555  $temp = $this->generic_search(Array('access_class' => Array('%_User_Collection', 'use_like' => 1)), false, 0, 0, $and_write);
556 
557  if (isset($temp) && is_array($temp) && count($temp)) {
558  // We make sure that we don't return the God user, if there is one (unless we are God).
559  foreach ($temp as $user) {
560  $login_instance = $user->get_login_instance();
561  if ($this->god() || !$user->is_god()) {
562  array_push($ret, $user);
563  }
564  }
565  }
566 
567  return $ret;
568  }
569 
570  /***********************/
574  public function get_all_login_users( $and_write = false
575  ) {
576  $ret = Array();
577 
578  $temp = $this->generic_search(Array('access_class' => Array('%_User_Collection', 'use_like' => 1), 'tags' => Array('%', 'use_like' => 1)), false, 0, 0, $and_write);
579 
580  if (isset($temp) && is_array($temp) && count($temp)) {
581  // We make sure that we don't return the God user, if there is one (unless we are God).
582  foreach ($temp as $user) {
583  $login_instance = $user->get_login_instance();
584  if (isset($login_instance) && ($login_instance instanceof CO_Security_Login)) {
585  if ($this->god() || !$user->is_god()) {
586  array_push($ret, $user);
587  }
588  }
589  }
590  }
591 
592  return $ret;
593  }
594 
595  /***********************/
599  public function get_all_standalone_users( $and_write = false
600  ) {
601  $ret = Array();
602 
603  $temp = $this->generic_search(Array('access_class' => Array('%_User_Collection', 'use_like' => 1), 'tags' => Array('')), false, 0, 0, $and_write);
604 
605  if (isset($temp) && is_array($temp) && count($temp)) {
606  // We make sure that we don't return the God user, if there is one (unless we are God).
607  foreach ($temp as $user) {
608  $login_instance = $user->get_login_instance();
609  if ($this->god() || !$user->is_god()) {
610  array_push($ret, $user);
611  }
612  }
613  }
614 
615  return $ret;
616  }
617 
618  /***********************/
622  public function tag_search( $in_tags_associative_array,
627  $in_or_search = false,
628  $page_size = 0,
629  $initial_page = 0,
630  $and_writeable = false,
631  $count_only = false,
632  $ids_only = false
633  ) {
634  $tags_array = Array();
635  $ret = Array();
636 
637  return $ret;
638  }
639 
640  /************************************************************************************************************************/
641  /*################################################ USER MANAGEMENT METHODS #############################################*/
642  /************************************************************************************************************************/
643 
644  /***********************/
651  public function get_user_from_login( $in_login_integer_id = NULL,
652  $in_make_user_if_necessary = false
653  ) {
654  $ret = NULL;
655 
656  if ($in_make_user_if_necessary && $this->manager()) { // See if we are a manager, and they want to maybe create a new user.
657  $ret = $this->get_cobra_instance()->get_user_from_login($in_login_integer_id, $in_make_user_if_necessary);
658 
659  $this->error = isset($this->get_cobra_instance()->error) ? $this->get_cobra_instance()->error : NULL;
660  } else {
661  $ret = $this->get_chameleon_instance()->get_user_from_login($in_login_integer_id);
662 
663  $this->error = isset($this->get_chameleon_instance()->error) ? $this->get_chameleon_instance()->error : NULL;
664  }
665 
666  return $ret;
667  }
668 
669  /***********************/
675  public function make_standalone_user() {
676  $ret = NULL;
677 
678  if ($this->manager()) { // Don't even bother unless we're a manager.
679  $ret = $login_item = $this->get_cobra_instance()->make_standalone_user();
680 
681  if (isset($ret) && ($ret instanceof CO_User_Collection)) {
682  $generic_name = sprintf(CO_ANDISOL_Lang::$andisol_new_unnamed_user_name_format, $ret->id());
683  $ret->set_name($generic_name);
684  }
685  } else {
689  }
690 
691  return $ret;
692  }
693 
694  /***********************/
701  public function create_new_standard_login( $in_login_id,
702  $in_cleartext_password,
703  $in_create_this_many_personal_ids = 0
704  ) {
705  return $this->get_cobra_instance()->create_new_standard_login($in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids);
706  }
707 
708  /***********************/
715  public function create_new_manager_login( $in_login_id,
716  $in_cleartext_password,
717  $in_create_this_many_personal_ids = 0
718  ) {
719  return $this->get_cobra_instance()->create_new_manager_login($in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids);
720  }
721 
722  /***********************/
731  public function create_new_user( $in_login_string_id,
732  $in_password = NULL,
733  $in_display_name = NULL,
734  $in_security_tokens = NULL,
735  $in_read_security_id = NULL,
736  $is_manager = false,
737  $in_create_this_many_personal_ids = 0
738  ) {
739  $ret = NULL;
740 
741  if ($in_login_string_id) {
742  if ($this->manager()) { // Don't even bother unless we're a manager.
743  $login_item = NULL;
744 
745  // See if we need to auto-generate a password.
746  if (!$in_password || (strlen($in_password) < CO_Config::$min_pw_len)) {
747  $in_password = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*~_-=+;:,.!?"), 0, CO_Config::$min_pw_len);
748  }
749 
750  if ($is_manager) { // See if they want to create a manager, or a standard login.
751  $login_item = $this->get_cobra_instance()->create_new_manager_login($in_login_string_id, $in_password, $in_create_this_many_personal_ids);
752  } else {
753  $login_item = $this->get_cobra_instance()->create_new_standard_login($in_login_string_id, $in_password, $in_create_this_many_personal_ids);
754  }
755 
756  // Make sure we got what we expect.
757  if ($login_item instanceof CO_Security_Login) {
758  // Set any provided security tokens.
759  if (is_array($in_security_tokens) && count($in_security_tokens)) {
760  $login_item->set_ids($in_security_tokens);
761  }
762 
763  // Next, set the display name.
764  $display_name = $in_display_name;
765  if (!$display_name) {
766  $display_name = $in_login_string_id;
767  }
768 
769  // Set the display name.
770  if ($login_item->set_name($display_name)) {
771  // Assuming all that went well, now we create the user item.
772  $id = $login_item->id();
773  $user_item = $this->get_cobra_instance()->get_user_from_login($id, true);
774 
775  if (isset($in_read_security_id) && intval($in_read_security_id)) {
776  if (!$user_item->set_read_security_id(intval($in_read_security_id))) {
777  $user_item->delete_from_db();
778  $login_item->delete_from_db();
779  $user_item = NULL;
780  $login_item = NULL;
784  } elseif (!$login_item->set_read_security_id($login_item->id())) {
785  $user_item->delete_from_db();
786  $login_item->delete_from_db();
787  $user_item = NULL;
788  $login_item = NULL;
792  }
793  } else { // By default, users are any-login-readable, and logins are login-user-only readable, and neither can be written except by the login.
794  if (!$user_item->set_read_security_id(1)) {
795  $user_item->delete_from_db();
796  $login_item->delete_from_db();
797  $user_item = NULL;
798  $login_item = NULL;
802  } elseif (!$login_item->set_read_security_id($login_item->id())) {
803  $user_item->delete_from_db();
804  $login_item->delete_from_db();
805  $user_item = NULL;
806  $login_item = NULL;
810  }
811  }
812 
813  if ($user_item instanceof CO_User_Collection) {
814  if ($user_item->set_name($display_name)) {
815  if ($login_item->set_password_from_cleartext($in_password)) {
816  $ret = $in_password;
817  } else {
818  $user_item->delete_from_db();
819  $login_item->delete_from_db();
820  $user_item = NULL;
821  $login_item = NULL;
825  }
826  } else {
827  $user_item->delete_from_db();
828  $login_item->delete_from_db();
829  $user_item = NULL;
830  $login_item = NULL;
834  }
835  } else {
836  $this->error = $this->get_cobra_instance()->error;
837 
838  // Just in case something was created.
839  if (isset($user_item) && ($user_item instanceof A_CO_DB_Table_Base)) {
840  $user_item->delete_from_db();
841  }
842 
843  $user_item = NULL;
844 
845  $login_item->delete_from_db();
846  $login_item = NULL;
847  if (!$this->error) {
851  }
852  }
853  } else {
854  $this->error = $this->get_cobra_instance()->error;
855  $login_item->delete_from_db();
856  $login_item = NULL;
857  if (!$this->error) {
861  }
862  }
863 
864  } else {
865  $this->error = $this->get_cobra_instance()->error;
866 
867  // Just in case something was created.
868  if (isset($login_item) && ($login_item instanceof A_CO_DB_Table_Base)) {
869  $login_item->delete_from_db();
870  }
871 
872  $login_item = NULL;
873 
874  if (!$this->error) {
878  }
879  }
880  } else {
884  }
885  }
886 
887  return $ret;
888  }
889 
890  /***********************/
898  public function delete_user( $in_login_string_id,
899  $with_extreme_prejudice = false
900  ) {
901  $ret = false;
902 
903  if ($in_login_string_id) {
904  if ($this->manager()) { // Don't even bother unless we're a manager.
905  // First, fetch the login item.
906  $login_item = $this->get_cobra_instance()->get_login_instance($in_login_string_id);
907  if ($login_item) {
908  // Next, get the user item.
909  $user_item = $this->get_cobra_instance()->get_user_from_login($login_item->id());
910  if ($user_item) {
911  // We have to have both the login and the user. Now, we make sure that we have write perms on both.
912  if ($login_item->user_can_write() && $user_item->user_can_write()) {
913  if ($user_item->delete_from_db($with_extreme_prejudice, true)) {
914  $ret = true;
915  } else {
916  $this->error = $user_item->error;
917  if (!$this->error) {
921  }
922  }
923  } else {
927  }
928  } else {
929  $this->error = $this->get_cobra_instance()->error;
930  if (!$this->error) {
934  }
935  }
936  } else {
937  $this->error = $this->get_cobra_instance()->error;
938  if (!$this->error) {
942  }
943  }
944  } else {
948  }
949  }
950 
951  return $ret;
952  }
953 
954  /***********************/
958  public function get_all_logins( $and_write = false,
959  $in_login_string_id = NULL,
960  $in_login_integer_id = NULL
961  ) {
962  $ret = Array();
963 
964  if ($this->manager()) { // Don't even bother unless we're a manager.
965  $ret = $this->get_cobra_instance()->get_all_logins($and_write, $in_login_string_id, $in_login_integer_id);
966 
967  if (isset($this->get_cobra_instance()->error)) {
968  $this->error = $this->get_cobra_instance()->error;
969  }
970  } else {
974  }
975 
976  return $ret;
977  }
978 
979  /***********************/
987  public function convert_login( $in_login_id,
988  $in_is_login_manager = false
989  ) {
990  return $this->get_cobra_instance()->convert_login($in_login_id, $in_is_login_manager);
991  }
992 
993  /***********************/
1000  public function make_security_token() {
1001  return $this->_make_security_token();
1002  }
1003 
1004  /************************************************************************************************************************/
1005  /*################################################## DATA ACCESS METHODS ###############################################*/
1006  /************************************************************************************************************************/
1007 
1008  /***********************/
1016  public function get_multiple_data_records_by_id( $in_id_array
1017  ) {
1018  $ret = $this->get_chameleon_instance()->get_multiple_data_records_by_id($in_id_array);
1019 
1020  if (isset($this->get_chameleon_instance()->error)) {
1021  $this->error = $this->get_chameleon_instance()->error;
1022  }
1023 
1024  return $ret;
1025  }
1026 
1027  /***********************/
1033  public function get_single_data_record_by_id( $in_id
1034  ) {
1035  $ret = $this->get_chameleon_instance()->get_single_data_record_by_id($in_id);
1036 
1037  if (isset($this->get_chameleon_instance()->error)) {
1038  $this->error = $this->get_chameleon_instance()->error;
1039  }
1040 
1041  return $ret;
1042  }
1043 
1044  /************************************************************************************************************************/
1045  /*############################################### DATA MODIFICATION METHODS ############################################*/
1046  /************************************************************************************************************************/
1047 
1048  /************************************************************************************************************************/
1049  /* GENERIC METHODS */
1050  /************************************************************************************************************************/
1051 
1052  /***********************/
1058  public function create_general_data_item( $in_read_security_id = 1,
1059  $in_write_security_id = NULL,
1060  $in_classname = 'CO_Main_DB_Record'
1061  ) {
1062  return $this->_create_db_object($in_classname, $in_read_security_id, $in_write_security_id);
1063  }
1064 
1065  /***********************/
1071  public function create_collection( $in_initial_item_ids = [],
1072  $in_read_security_id = 1,
1073  $in_write_security_id = NULL,
1074  $in_classname = 'CO_Collection'
1075  ) {
1076  $ret = $this->create_general_data_item($in_read_security_id, $in_write_security_id, $in_classname);
1077 
1078  if (isset($in_initial_item_ids) && is_array($in_initial_item_ids) && count($in_initial_item_ids) && isset($ret) && ($ret instanceof CO_Collection)) {
1079  $elements = $this->get_chameleon_instance()->get_multiple_data_records_by_id($in_initial_item_ids);
1080  if (isset($this->get_chameleon_instance()->error)) {
1081  $this->error = $this->get_chameleon_instance()->error;
1082  }
1083 
1084  if (isset($elements) && is_array($elements) && count($elements) && !isset($this->error)) {
1085  if (!$ret->appendElements($elements)) {
1086  $this->error = $ret->error;
1087  $ret->delete_from_db();
1088  $ret = NULL;
1089  }
1090  } else {
1091  $ret->delete_from_db();
1092  $ret = NULL;
1093  }
1094  }
1095 
1096  return $ret;
1097  }
1098 
1099  /***********************/
1105  public function delete_item_by_id( $in_item_id_integer
1106  ) {
1107  $ret = false;
1108 
1109  if ($this->logged_in()) {
1110  $ret = $this->get_chameleon_instance()->delete_data_record($in_item_id_integer);
1111  if (isset($this->get_chameleon_instance()->error)) {
1112  $this->error = $this->get_chameleon_instance()->error;
1113  }
1114  } else {
1118  }
1119 
1120  return $ret;
1121  }
1122 
1123  /************************************************************************************************************************/
1124  /* KEY/VALUE METHODS */
1125  /************************************************************************************************************************/
1126 
1127  /***********************/
1131  public function get_value_for_key( $in_key,
1132  $in_classname = 'CO_KeyValue_CO_Collection'
1133  ) {
1134  $ret = NULL;
1135 
1136  if ($this->valid()) {
1137  $ret = $this->get_chameleon_instance()->get_value_for_key($in_key, $in_classname);
1138  if (isset($this->get_chameleon_instance()->error)) {
1139  $this->error = $this->get_chameleon_instance()->error;
1140  }
1141  }
1142 
1143  return $ret;
1144  }
1145 
1146  /***********************/
1150  public function key_is_unique( $in_key,
1151  $in_classname = 'CO_KeyValue_CO_Collection'
1152  ) {
1153  return $this->get_chameleon_instance()->key_is_unique($in_key, $in_classname);
1154  }
1155 
1156  /***********************/
1160  public function get_object_for_key( $in_key
1161  ) {
1162  $ret = NULL;
1163 
1164  if ($this->valid()) {
1165  $ret = $this->get_chameleon_instance()->get_object_for_key($in_key);
1166  }
1167 
1168  return $ret;
1169  }
1170 
1171  /***********************/
1177  public function delete_key( $in_key,
1178  $in_classname = 'CO_KeyValue_CO_Collection'
1179  ) {
1180  return $this->set_value_for_key($in_key, NULL, $in_classname);
1181  }
1182 
1183  /***********************/
1191  public function set_value_for_key( $in_key,
1192  $in_value,
1193  $in_classname = 'CO_KeyValue_CO_Collection'
1194  ) {
1195  $ret = NULL;
1196 
1197  if ($this->logged_in()) {
1198  $ret = $this->get_chameleon_instance()->set_value_for_key($in_key, $in_value, $in_classname);
1199  if (isset($this->get_chameleon_instance()->error)) {
1200  $this->error = $this->get_chameleon_instance()->error;
1201  }
1202  } else {
1206  }
1207 
1208  return $ret;
1209  }
1210 
1211  /************************************************************************************************************************/
1212  /* LOCATION METHODS */
1213  /************************************************************************************************************************/
1214 
1215  /***********************/
1221  public function create_ll_location( $in_longitude_degrees,
1222  $in_latitude_degrees,
1223  $in_fuzz_factor = NULL,
1232  $in_see_clearly_id = NULL,
1233  $in_read_security_id = 1,
1234  $in_write_security_id = NULL,
1235  $in_classname = 'CO_LL_Location'
1236  ) {
1237  $ret = NULL;
1238 
1239  $instance = $this->create_general_data_item($in_read_security_id, $in_write_security_id, $in_classname);
1240 
1241  // First, make sure we're in the right ballpark.
1242  if (isset($instance) && ($instance instanceof CO_LL_Location)) {
1243  if ($instance->set_longitude($in_longitude_degrees)) {
1244  if ($instance->set_latitude($in_latitude_degrees)) {
1245  if (isset($in_fuzz_factor) && (0.0 < floatval($in_fuzz_factor))) {
1246  if ($instance->set_fuzz_factor($in_fuzz_factor)) {
1247  if (isset($in_see_clearly_id) && (0 < intval($in_see_clearly_id))) {
1248  if ($instance->set_can_see_through_the_fuzz($in_see_clearly_id)) {
1249  $ret = $instance;
1250  } else {
1251  if ($instance->error) {
1252  $this->error = $instance->error;
1253  }
1254 
1255  $instance->delete_from_db();
1256  }
1257  } else {
1258  $ret = $instance;
1259  }
1260  } else {
1261  if ($instance->error) {
1262  $this->error = $instance->error;
1263  }
1264 
1265  $instance->delete_from_db();
1266  }
1267  } else {
1268  $ret = $instance;
1269  }
1270  } else {
1271  if ($instance->error) {
1272  $this->error = $instance->error;
1273  }
1274 
1275  $instance->delete_from_db();
1276  }
1277  } else {
1278  if ($instance->error) {
1279  $this->error = $instance->error;
1280  }
1281 
1282  $instance->delete_from_db();
1283  }
1284  } else {
1285  if (isset($instance) && ($instance instanceof A_CO_DB_Table_Base)) {
1286  if ($instance->error) {
1287  $this->error = $instance->error;
1288  }
1289 
1290  $instance->delete_from_db();
1291  }
1292  }
1293 
1294  return $ret;
1295  }
1296 
1297  /***********************/
1304  public function create_place( $auto_resolve = true,
1305  $in_venue = NULL,
1306  $in_street_address = NULL,
1307  $in_municipality = NULL,
1308  $in_county = NULL,
1309  $in_province = NULL,
1310  $in_postal_code = NULL,
1311  $in_nation = NULL,
1312  $in_extra_info = NULL,
1313  $in_longitude_degrees = NULL,
1314  $in_latitude_degrees = NULL,
1315  $in_fuzz_factor = NULL,
1324  $in_see_clearly_id = NULL,
1325  $in_read_security_id = 1,
1326  $in_write_security_id = NULL,
1327  $in_classname = 'CO_Place'
1328  ) {
1329  $ret = NULL;
1330 
1331  // We can create the special US version of the place, if we know we are US (Only if we are using the generic base class).
1332  if (((strtoupper($in_nation) == 'US') || (strtoupper($in_nation) == 'USA')) && ($in_classname == 'CO_Place')) {
1333  $in_classname ='CO_US_Place';
1334  }
1335 
1336  // If we know we are US, then we don't need to specify a nation.
1337  if ($in_classname == 'CO_US_Place') {
1338  $in_nation = NULL;
1339  }
1340 
1341  // We have to have at least enough basic information to denote a place.
1342  if((isset($in_longitude_degrees) && isset($in_longitude_degrees)) ||
1343  isset($in_venue) ||
1344  isset($in_street_address) ||
1345  isset($in_municipality) ||
1346  isset($in_county) ||
1347  isset($in_province) ||
1348  isset($in_postal_code) ||
1349  isset($in_nation)) {
1350  $instance = $this->create_general_data_item($in_read_security_id, $in_write_security_id, $in_classname);
1351 
1352  // First, make sure we're in the right ballpark.
1353  if (isset($instance) && ($instance instanceof CO_Place)) {
1354  $long_lat_explicitly_set = false; // We use this to figure whether or not to do an initial lookup.
1355  $address_explicitly_set = false; // We use this to figure whether or not to do an initial geocode.
1356 
1357  // If a long/lat was provided, we start by setting that to our object.
1358  if(isset($in_longitude_degrees) && isset($in_longitude_degrees)) {
1359  if ($instance->set_longitude($in_longitude_degrees)) {
1360  if ($instance->set_latitude($in_latitude_degrees)) {
1361  $long_lat_explicitly_set = true; // This means we won't be needing a lookup.
1362  } else {
1363  if ($instance->error) {
1364  $this->error = $instance->error;
1365  }
1366 
1367  $instance->delete_from_db();
1368  $instance = NULL;
1369  }
1370  } else {
1371  if ($instance->error) {
1372  $this->error = $instance->error;
1373  }
1374 
1375  $instance->delete_from_db();
1376  $instance = NULL;
1377  }
1378  }
1379 
1380  // Next, see if a venue name was provided.
1381  if(isset($instance) && isset($in_venue)) {
1382  if ($instance->set_tag(0, $in_venue)) {
1383  $address_explicitly_set = true;
1384  } else {
1385  if ($instance->error) {
1386  $this->error = $instance->error;
1387  }
1388 
1389  $instance->delete_from_db();
1390  $instance = NULL;
1391  }
1392  }
1393 
1394  // Next, see if extra info was provided.
1395  if(isset($instance) && isset($in_extra_info)) {
1396  if (!$instance->set_tag(2, $in_extra_info)) {
1397  if ($instance->error) {
1398  $this->error = $instance->error;
1399  }
1400 
1401  $instance->delete_from_db();
1402  $instance = NULL;
1403  }
1404  }
1405 
1406  // We only allow a specific address to be entered if this is a "non-fuzzed" location. This is a security measure.
1407  if (isset($instance) && (!isset($in_fuzz_factor) || (0.0 == floatval($in_fuzz_factor)))) {
1408  // Next, see if a street address was provided.
1409  if(isset($instance) && isset($in_street_address)) {
1410  if ($instance->set_tag(1, $in_street_address)) {
1411  $address_explicitly_set = true;
1412  } else {
1413  if ($instance->error) {
1414  $this->error = $instance->error;
1415  }
1416 
1417  $instance->delete_from_db();
1418  $instance = NULL;
1419  }
1420  }
1421 
1422  // Next, see if a town was provided.
1423  if(isset($instance) && isset($in_municipality)) {
1424  if ($instance->set_tag(3, $in_municipality)) {
1425  $address_explicitly_set = true;
1426  } else {
1427  if ($instance->error) {
1428  $this->error = $instance->error;
1429  }
1430 
1431  $instance->delete_from_db();
1432  $instance = NULL;
1433  }
1434  }
1435 
1436  // Next, see if a county was provided.
1437  if(isset($instance) && isset($in_county)) {
1438  if ($instance->set_tag(4, $in_county)) {
1439  $address_explicitly_set = true;
1440  } else {
1441  if ($instance->error) {
1442  $this->error = $instance->error;
1443  }
1444 
1445  $instance->delete_from_db();
1446  $instance = NULL;
1447  }
1448  }
1449 
1450  // Next, see if a state was provided.
1451  if(isset($instance) && isset($in_province)) {
1452  if ($instance->set_tag(5, $in_province)) {
1453  $address_explicitly_set = true;
1454  } else {
1455  if ($instance->error) {
1456  $this->error = $instance->error;
1457  }
1458 
1459  $instance->delete_from_db();
1460  $instance = NULL;
1461  }
1462  }
1463 
1464  // Next, see if a ZIP code was provided.
1465  if(isset($instance) && isset($in_postal_code)) {
1466  if ($instance->set_tag(6, $in_postal_code)) {
1467  $address_explicitly_set = true;
1468  } else {
1469  if ($instance->error) {
1470  $this->error = $instance->error;
1471  }
1472 
1473  $instance->delete_from_db();
1474  $instance = NULL;
1475  }
1476  }
1477 
1478  // Next, see if a nation was provided.
1479  if(isset($instance) && isset($in_nation)) {
1480  if ($instance->set_tag(7, $in_nation)) {
1481  $address_explicitly_set = true;
1482  } else {
1483  if ($instance->error) {
1484  $this->error = $instance->error;
1485  }
1486 
1487  $instance->delete_from_db();
1488  $instance = NULL;
1489  }
1490  }
1491  } elseif (isset($instance)) {
1492  $auto_resolve = false; // We do not do an auto-lookup if we are "fuzzy."
1493 
1494  if ($instance->set_fuzz_factor($in_fuzz_factor)) {
1495  if (isset($in_see_clearly_id) && (0 < intval($in_see_clearly_id))) {
1496  if (!$instance->set_can_see_through_the_fuzz($in_see_clearly_id)) {
1497  if ($instance->error) {
1498  $this->error = $instance->error;
1499  }
1500 
1501  $instance->delete_from_db();
1502  $instance = NULL;
1503  }
1504  }
1505  } else {
1506  if ($instance->error) {
1507  $this->error = $instance->error;
1508  }
1509 
1510  $instance->delete_from_db();
1511  $instance = NULL;
1512  }
1513  }
1514 
1515  // OK. If we are here, and still have a valid instance, then we can "set it in stone," and see if we need to do a geocode.
1516  if (isset($instance)) {
1517  $instance->set_address_elements($instance->tags(), true);
1518 
1519  // If we did not explicitly set a long/lat, and have a Google API key (assumed valid), then let's try a geocode.
1520  if ($auto_resolve && !$long_lat_explicitly_set && CO_Config::$google_api_key) { // If we can do a lookup, and need to, then lets's give that a go.
1521  $long_lat = $instance->lookup_address();
1522 
1523  if (isset($long_lat) && is_array($long_lat) && (1 < count($long_lat))) {
1524  if ($instance->set_longitude($long_lat['longitude'])) {
1525  if ($instance->set_latitude($long_lat['latitude'])) {
1526  $ret = $instance; // Now we're ready for our close-up, Mr. DeMille...
1527  } else {
1528  if ($instance->error) {
1529  $this->error = $instance->error;
1530  }
1531 
1532  $instance->delete_from_db();
1533  $instance = NULL;
1534  }
1535  } else {
1536  if ($instance->error) {
1537  $this->error = $instance->error;
1538  }
1539 
1540  $instance->delete_from_db();
1541  $instance = NULL;
1542  }
1543  } else {
1544  if ($instance->error) {
1545  $this->error = $instance->error;
1546  }
1547 
1548  $instance->delete_from_db();
1549  $instance = NULL;
1550  }
1551  } else { // Otherwise, we simply send the current result back.
1552  $ret = $instance;
1553  }
1554 
1555  // If we did not explicitly set an address, and have a Google API key (assumed valid), then let's try a geocode.
1556  if ($ret && $auto_resolve && !$address_explicitly_set && CO_Config::$google_api_key) { // If we can do a lookup, and need to, then lets's give that a go.
1557  $ret = NULL; // Not so fast, Skippy.
1558  $address = $instance->geocode_long_lat();
1559  if (isset($address) && is_array($address) && (0 < count($address))) {
1560  for ($i = 0; $i < 8; $i++) {
1561  eval("\$key = CO_CHAMELEON_Lang::\$chameleon_co_place_tag_$i;");
1562 
1563  if (isset($address[$key]) && trim($address[$key])) { // Is there a venue?
1564  if (!$instance->set_tag($i, trim($address[$key]))) {
1565  if ($instance->error) {
1566  $this->error = $instance->error;
1567  }
1568 
1569  $instance->delete_from_db();
1570  $instance = NULL;
1571  break;
1572  }
1573  }
1574  }
1575 
1576  // OK. Now we can do it.
1577  if (isset($instance)) {
1578  // This sets the object up to what we just sent in.
1579  $instance->set_address_elements($instance->tags(), true);
1580  $ret = $instance;
1581  }
1582  } else {
1583  if ($instance->error) {
1584  $this->error = $instance->error;
1585  }
1586 
1587  $instance->delete_from_db();
1588  $instance = NULL;
1589  }
1590  }
1591  } else {
1595  }
1596  } else {
1600  }
1601  } else {
1605  }
1606 
1607  return $ret;
1608  }
1609 
1610  /***********************/
1617  public function create_ll_place($in_longitude_degrees,
1618  $in_latitude_degrees,
1619  $in_fuzz_factor = NULL,
1628  $in_see_clearly_id = NULL,
1629  $in_read_security_id = 1,
1630  $in_write_security_id = NULL,
1631  $in_classname = 'CO_Place'
1632  ) {
1633  return $this->create_place(true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor, $in_see_clearly_id, $in_read_security_id, $in_write_security_id, $in_classname);
1634  }
1635 
1636  /***********************/
1643  public function create_ll_us_place( $in_longitude_degrees,
1644  $in_latitude_degrees,
1645  $in_fuzz_factor = NULL,
1654  $in_see_clearly_id = NULL,
1655  $in_read_security_id = 1,
1656  $in_write_security_id = NULL
1657  ) {
1658  return $this->create_place(true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor, $in_see_clearly_id, $in_read_security_id, $in_write_security_id, 'CO_US_Place');
1659  }
1660 
1661  /***********************/
1668  public function create_place_collection($auto_resolve = true,
1669  $in_venue = NULL,
1670  $in_street_address = NULL,
1671  $in_municipality = NULL,
1672  $in_county = NULL,
1673  $in_province = NULL,
1674  $in_postal_code = NULL,
1675  $in_nation = NULL,
1676  $in_extra_info = NULL,
1677  $in_longitude_degrees = NULL,
1678  $in_latitude_degrees = NULL,
1679  $in_fuzz_factor = NULL,
1688  $in_see_clearly_id = NULL,
1689  $in_read_security_id = 1,
1690  $in_write_security_id = NULL
1691  ) {
1692  $class = 'CO_Place_Collection';
1693 
1694  // We can create the special US version of the place, if we know we are US.
1695  if ((strtoupper($in_nation) == 'US') || (strtoupper($in_nation) == 'USA')) {
1696  $class ='CO_US_Place_Collection';
1697  $in_nation = NULL;
1698  }
1699 
1700  return $this->create_place($auto_resolve, $in_venue, $in_street_address, $in_municipality, $in_county, $in_province, $in_postal_code, NULL, NULL, $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor, $in_see_clearly_id, $in_read_security_id, $in_write_security_id, $class);
1701  }
1702 
1703  /***********************/
1712  public function get_available_tokens() {
1713  return $this->get_chameleon_instance()->get_available_tokens();
1714  }
1715 
1716  /***********************/
1726  public function count_all_login_objects_with_access($in_security_token
1727  ) {
1728  return $this->get_chameleon_instance()->count_all_login_objects_with_access($in_security_token);
1729  }
1730 
1731  /***********************/
1735  public function get_all_visible_users() {
1736  return $this->get_chameleon_instance()->get_all_visible_users();
1737  }
1738 
1739  /***********************/
1743  public function get_all_visible_logins() {
1744  return $this->get_chameleon_instance->get_all_visible_users();
1745  }
1746 
1747  /***********************/
1755  public function can_i_see_this_data_record( $in_id
1756  ) {
1757  return $this->get_chameleon_instance()->can_i_see_this_data_record($in_id);
1758  }
1759 
1760  /***********************/
1768  public function can_i_see_this_security_record( $in_id
1769  ) {
1770  return $this->get_chameleon_instance()->can_i_see_this_security_record($in_id);
1771  }
1772 
1773  /***********************/
1781  public function get_all_login_objects_with_access( $in_security_token,
1782  $and_write = false
1783  ) {
1784  return $this->get_chameleon_instance()->get_all_login_objects_with_access($in_security_token, $and_write);
1785  }
1786 
1787  /***********************/
1795  public function get_all_user_objects_with_access( $in_security_token
1796  ) {
1797  return $this->get_chameleon_instance()->get_all_user_objects_with_access($in_security_token);
1798  }
1799 
1800  /***********************/
1808  public function fetch_backup() {
1809  return $this->get_chameleon_instance()->fetch_backup();
1810  }
1811 
1812  /***********************/
1816  public function check_login_exists_by_login_string( $in_login_id_string
1817  ) {
1818  return $this->get_chameleon_instance()->check_login_exists_by_login_string($in_login_id_string);
1819  }
1820 
1821  /***********************/
1829  public function make_new_blank_record( $in_classname
1830  ) {
1831  return $this->get_chameleon_instance()->make_new_blank_record($in_classname);
1832  }
1833 
1834  /************************************************************************************************************************/
1835  /* PERSONAL ID METHODS */
1836  /************************************************************************************************************************/
1837 
1838  /***********************/
1846  public function get_personal_security_ids() {
1847  return $this->get_chameleon_instance()->get_personal_security_ids();
1848  }
1849 
1850  /***********************/
1860  public function set_personal_ids( $in_login_id,
1861  $in_personal_ids = []
1862  ) {
1863  return $this->get_cobra_instance()->set_personal_ids($in_login_id, $in_personal_ids);
1864  }
1865 
1866  /***********************/
1874  public function get_all_personal_ids_except_for_id( $in_id = 0
1875  ) {
1876  return $this->get_chameleon_instance()->get_all_personal_ids_except_for_id($in_id);
1877  }
1878 
1879  /***********************/
1886  public function get_logins_with_personal_ids() {
1887  return $this->get_chameleon_instance()->get_logins_with_personal_ids();
1888  }
1889 
1890  /***********************/
1896  public function is_this_a_personal_id( $in_id
1897  ) {
1898  return $this->get_chameleon_instance()->is_this_a_personal_id($in_id);
1899  }
1900 
1901  /***********************/
1907  public function is_this_a_login_id( $in_id
1908  ) {
1909  return $this->get_chameleon_instance()->is_this_a_login_id($in_id);
1910  }
1911 
1912  /***********************/
1918  public function add_personal_token_from_current_login( $in_to_id,
1919  $in_id
1920  ) {
1921  return $this->get_chameleon_instance()->add_personal_token_from_current_login($in_to_id, $in_id);
1922  }
1923 
1924  /***********************/
1930  public function remove_personal_token_from_this_login( $in_to_id,
1931  $in_id
1932  ) {
1933  return $this->get_chameleon_instance()->remove_personal_token_from_this_login($in_to_id, $in_id);
1934  }
1935 
1936  /***********************/
1943  return $this->get_chameleon_instance()->get_logins_that_have_any_of_my_ids();
1944  }
1945 
1946  /***********************/
1950  public function get_remaining_time($in_login_id = NULL
1951  ) {
1952  return $this->get_chameleon_instance()->get_remaining_time($in_login_id);
1953  }
1954 };
if(!defined( 'LGV_ACCESS_CATCHER'))
const __ANDISOL_VERSION__
get_login_item_by_login_string( $in_login_string_id)
is_this_a_personal_id( $in_id)
location_search( $in_longitude_degrees, $in_latitude_degrees, $in_radius_kilometers, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)
can_i_see_this_data_record( $in_id)
create_collection( $in_initial_item_ids=[], $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Collection')
create_general_data_item( $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Main_DB_Record')
set_personal_ids( $in_login_id, $in_personal_ids=[])
_create_db_object( $in_classname, $in_read_security_id=1, $in_write_security_id=NULL)
get_multiple_data_records_by_id( $in_id_array)
get_logins_that_have_any_of_my_ids()
create_ll_location( $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_LL_Location')
get_login_item( $in_login_integer_id=NULL)
get_remaining_time($in_login_id=NULL)
convert_login( $in_login_id, $in_is_login_manager=false)
delete_item_by_id( $in_item_id_integer)
__construct( $in_login_string_id=NULL, $in_hashed_password=NULL, $in_raw_password=NULL, $in_api_key=NULL)
count_all_login_objects_with_access($in_security_token)
delete_key( $in_key, $in_classname='CO_KeyValue_CO_Collection')
get_all_user_objects_with_access( $in_security_token)
check_login_exists_by_login_string( $in_login_id_string)
make_new_blank_record( $in_classname)
create_place_collection($auto_resolve=true, $in_venue=NULL, $in_street_address=NULL, $in_municipality=NULL, $in_county=NULL, $in_province=NULL, $in_postal_code=NULL, $in_nation=NULL, $in_extra_info=NULL, $in_longitude_degrees=NULL, $in_latitude_degrees=NULL, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL)
who_can_see( $in_test_target)
get_all_login_objects_with_access( $in_security_token, $and_write=false)
create_ll_place($in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Place')
get_object_for_key( $in_key)
create_new_user( $in_login_string_id, $in_password=NULL, $in_display_name=NULL, $in_security_tokens=NULL, $in_read_security_id=NULL, $is_manager=false, $in_create_this_many_personal_ids=0)
i_have_this_token( $in_token_to_test)
create_ll_us_place( $in_longitude_degrees, $in_latitude_degrees, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL)
add_personal_token_from_current_login( $in_to_id, $in_id)
get_user_from_login( $in_login_integer_id=NULL, $in_make_user_if_necessary=false)
get_single_data_record_by_id( $in_id)
$_chameleon_instance
This is the CHAMELEON instance.
create_place( $auto_resolve=true, $in_venue=NULL, $in_street_address=NULL, $in_municipality=NULL, $in_county=NULL, $in_province=NULL, $in_postal_code=NULL, $in_nation=NULL, $in_extra_info=NULL, $in_longitude_degrees=NULL, $in_latitude_degrees=NULL, $in_fuzz_factor=NULL, $in_see_clearly_id=NULL, $in_read_security_id=1, $in_write_security_id=NULL, $in_classname='CO_Place')
get_user_from_login_string( $in_login_string_id)
$_cobra_instance
This is the COBRA instance.
create_new_manager_login( $in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids=0)
get_all_login_users( $and_write=false)
remove_personal_token_from_this_login( $in_to_id, $in_id)
get_security_access_class_by_id( $in_id)
get_all_users( $and_write=false)
set_value_for_key( $in_key, $in_value, $in_classname='CO_KeyValue_CO_Collection')
delete_user( $in_login_string_id, $with_extreme_prejudice=false)
get_all_personal_ids_except_for_id( $in_id=0)
create_new_standard_login( $in_login_id, $in_cleartext_password, $in_create_this_many_personal_ids=0)
tag_search( $in_tags_associative_array, $in_or_search=false, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)
$version
The version indicator.
generic_search( $in_search_parameters=NULL, $or_search=false, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)
key_is_unique( $in_key, $in_classname='CO_KeyValue_CO_Collection')
get_all_standalone_users( $and_write=false)
is_this_a_login_id( $in_id)
get_all_logins( $and_write=false, $in_login_string_id=NULL, $in_login_integer_id=NULL)
get_value_for_key( $in_key, $in_classname='CO_KeyValue_CO_Collection')
can_i_see_this_security_record( $in_id)
$error
Any errors that occured are kept here.
get_data_access_class_by_id( $in_id)
static $andisol_error_code_login_instance_failed_to_initialize
Definition: common.inc.php:47
static $andisol_error_code_user_not_authorized
Definition: common.inc.php:46
static $andisol_error_code_user_not_deleted
Definition: common.inc.php:50
static $andisol_error_code_login_instance_unavailable
Definition: common.inc.php:48
static $andisol_error_code_location_failed_to_initialize
Definition: common.inc.php:53
static $andisol_error_code_insufficient_location_information
Definition: common.inc.php:52
static $andisol_error_code_user_instance_unavailable
Definition: common.inc.php:49
static $andisol_error_desc_user_not_deleted
Definition: en.php:41
static $andisol_new_unnamed_user_name_format
Definition: en.php:48
static $andisol_error_name_user_not_deleted
Definition: en.php:40
static $andisol_error_name_login_instance_unavailable
Definition: en.php:36
static $andisol_error_name_user_not_authorized
Definition: en.php:32
static $andisol_error_name_location_failed_to_initialize
Definition: en.php:46
static $andisol_error_desc_login_instance_failed_to_initialize
Definition: en.php:35
static $andisol_error_desc_location_failed_to_initialize
Definition: en.php:47
static $andisol_error_desc_insufficient_location_information
Definition: en.php:45
static $andisol_error_name_insufficient_location_information
Definition: en.php:44
static $andisol_error_desc_user_instance_unavailable
Definition: en.php:39
static $andisol_error_desc_user_not_authorized
Definition: en.php:33
static $andisol_error_name_login_instance_failed_to_initialize
Definition: en.php:34
static $andisol_error_desc_login_instance_unavailable
Definition: en.php:37
static $andisol_error_name_user_instance_unavailable
Definition: en.php:38
static make_cobra($in_chameleon_instance)
This class provides a general error report, with file, method and error information.
Definition: error.class.php:32