taskrambler  0.1.9
Web server and task management solution.
_validate_email.c File Reference
#include "application/application.h"
#include "session.h"
#include "hash.h"
#include "auth/credential.h"
#include "user.h"
#include "utils/memory.h"
+ Include dependency graph for _validate_email.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 

Functions

User _controllerCreateUserFromArgs (Hash args)
 

Detailed Description

Author
Georg Hopp

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file _validate_email.c.

Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 23 of file _validate_email.c.

Function Documentation

User _controllerCreateUserFromArgs ( Hash  args)

Definition at line 34 of file _validate_email.c.

References CSTRA, and hashGet().

35 {
36  HashValue email;
37  HashValue firstname;
38  HashValue surname;
39 
40  email = hashGet(args, CSTRA("email"));
41  firstname = hashGet(args, CSTRA("firstname"));
42  surname = hashGet(args, CSTRA("surname"));
43 
44  if (
45  NULL == email ||
46  NULL == firstname ||
47  NULL == surname)
48  {
49  return NULL;
50  }
51 
52  return new(User,
53  (char *)(email->value), email->nvalue,
54  (char *)(firstname->value), firstname->nvalue,
55  (char *)(surname->value), surname->nvalue);
56 }
#define CSTRA(val)
Const STRing Argument.
Definition: memory.h:26
void * hashGet(Hash, const char *, size_t)
Definition: hash/get.c:51

+ Here is the call graph for this function: