]> git.defcon.no Git - hermes/commitdiff
Permitedcalls is now called permittedcalls in the DB. Fixed a failure-failure resulti...
authorJon Langseth <jon.langseth@hig.no>
Tue, 7 Feb 2012 10:24:26 +0000 (11:24 +0100)
committerJon Langseth <jon.langseth@hig.no>
Tue, 7 Feb 2012 10:24:26 +0000 (11:24 +0100)
api/lib/user_functions.php
api/user.php

index 05ce335e9cc9fade7ec5ddb873b383dddba8acca..a022433554bd6615e268e2db0221594388052b5a 100644 (file)
@@ -307,7 +307,7 @@ function get_userdata( $username, $domain )
        if ( $type == 'local' )
        {
                // WARNING: Note the typo in the name of the 'permittedcalls' column!
-               $query_kamailio = sprintf ("SELECT id, username, domain, password, email_address, ha1, ha1b, rpid, permitedcalls FROM %s WHERE username = '%s' AND domain = '%s'",
+               $query_kamailio = sprintf ("SELECT id, username, domain, password, email_address, ha1, ha1b, rpid, permittedcalls FROM %s WHERE username = '%s' AND domain = '%s'",
                        $config['kamailio_subscriber_table'],
                        sql_clean($username),
                        sql_clean($domain));
index 7d5494dda1b6356c46db0739c6d89eb15b0ab43b..260ac35016365afc7f19a8d703beccd74ce019e5 100644 (file)
@@ -235,9 +235,10 @@ token_auth();
                                        delete_provision_user( $username, $domain );
                                        // Give errormessage, and quit.
                                        print json_encode( array( 'response' => 'failed', 'cause' => 'dbfail', 'detail' => 'Failed to read recently added data. Operations rolled back' ) );
-       
+                                       break;
                                }
                                print json_encode( array( 'response' => 'ok', 'user' => $userdata ));
+                               break;
                        }
                        else 
                                print json_encode( array( 'response' => 'invalid', 'cause' => 'parameters' ) );
@@ -356,9 +357,10 @@ token_auth();
                                        delete_provision_user( $username, $domain );
                                        // Give errormessage, and quit.
                                        print json_encode( array( 'response' => 'failed', 'cause' => 'dbfail', 'detail' => 'Failed to read recently added data. Operations rolled back' ) );
-       
+                                       break;
                                }
                                print json_encode( array( 'response' => 'ok', 'user' => $userdata ));
+                               break;
                        }
                        else 
                                print json_encode( array( 'response' => 'invalid', 'cause' => 'parameters' ) );