~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/utility_functions/user.cc

  • Committer: Monty Taylor
  • Date: 2010-12-02 22:51:54 UTC
  • mto: (1975.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1976.
  • Revision ID: mordred@inaugust.com-20101202225154-h54ifmga9x6cckgs
Refactored syslog module and changed it to use sys_var directly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
String *User::val_str(String *str)
34
34
{
35
35
  assert(fixed == 1);
36
 
  identifier::User::const_shared_ptr user= getSession().user();
37
 
  assert(user);
38
 
  if (user->username().empty())
 
36
  Session *session= current_session;
 
37
  if (session->getSecurityContext().getUser().empty())
39
38
  {
40
39
    null_value= 1;
41
40
    return 0;
42
41
  }
43
42
  else
44
43
  {
45
 
    str->copy(user->username().c_str(), user->username().length(), system_charset_info);
 
44
    str->copy(session->getSecurityContext().getUser().c_str(), session->getSecurityContext().getUser().length(), system_charset_info);
46
45
  }
47
46
  return str;
48
47
}