One more try at retrieving the DAViCal principal_id.
header += current_time.to_s
end
header += current_time.to_s
end
- header += '(Plugin: ' + plugin_class.to_s + ")\n"
+ header += ' (Plugin: ' + plugin_class.to_s + ")\n"
puts header
puts '-' * header.size # Underline the header.
puts header
puts '-' * header.size # Underline the header.
def describe_account(account)
def describe_account(account)
- user_id = self.get_principal_id(account)
+ principal_id = self.get_principal_id(account)
return 'User not found'
else
return 'User not found'
else
- return "Principal ID: #{user_id}"
+ return "Principal ID: #{principal_id}"
- sql_query = "SELECT principal_id FROM principal WHERE username = $1;"
+ sql_query = "SELECT principal.principal_id "
+ sql_query += "FROM (principal INNER JOIN usr "
+ sql_query += " ON principal.user_no = usr.user_no) "
+ sql_query += "WHERE usr.username = $1;"
connection.query(sql_query, [account]) do |result|
if result.num_tuples > 0
connection.query(sql_query, [account]) do |result|
if result.num_tuples > 0