/**
  * @param $my_id
  * @param $other_id
  * @return array|bool
  */
 public static function getRelationship($my_id, $other_id)
 {
     global $config;
     $al = new AL($config['database']);
     $predicates1 = array('u_id1' => $my_id, 'u_id2' => $other_id);
     $predicates2 = array('u_id1' => $other_id, 'u_id2' => $my_id);
     $res = $al->select_many('relationship', $predicates1);
     return $res ? $res : $al->select_many('relationship', $predicates2);
 }
 public static function authorize($email, $password)
 {
     global $config;
     $al = new AL($config['database']);
     $preds = array('u_email' => $email, 'u_password' => md5($password));
     $userProperties = $al->select_many('users', $preds);
     return $userProperties ? new User($userProperties) : false;
 }