Esempio n. 1
0
int
imap4d_session_setup (char *username)
{
  auth_data = mu_get_auth_by_name (username);
  if (auth_data == NULL)
    {
      mu_diag_output (MU_DIAG_INFO, _("user `%s' nonexistent"), username);
      return 1;
    }
  return imap4d_session_setup0 ();
}
Esempio n. 2
0
static PyObject *
api_get_auth_by_name (PyObject *self, PyObject *args)
{
  char *username;
  PyAuthData *py_ad = PyAuthData_NEW ();

  if (!PyArg_ParseTuple (args, "s", &username))
    return NULL;

  Py_INCREF (py_ad);

  py_ad->auth_data = mu_get_auth_by_name (username);
  if (!py_ad->auth_data)
    return _ro (Py_None);

  return _ro ((PyObject *)py_ad);
}