Vote count: 0 I have a user_data() function on my website which is supposed to grab a users data from the database when they are logged in. I don't see a problem with the code I have entered, however, it is still retuing the following error: syntax error, unexpected '$user_data' (T_VARIABLE), expecting ',' or ';' in /filepath The following is my initialisation script (init.php) in which I set the $user_data variable - to be used on pages such as the profile page: require_once '_DB/co.php'; // FUNCTIONS require_once '_func/class.php'; if(logged_in() === true){ $s_user = $_SESSION['user_id']; // the session is equal to the logged in users useame. $user_data = user_data($co, $s_user, 'id', 'fna...
ادامه مطلبVote count: -1 I am trying to upload a PDF document programmatically to a folder on my webhosting account; however, I receive the following error message. Access to the path 'D:CustomerDatawebspaceswebspace_xxxwwwrootassetsdocumentstest.pdf' is denied. I have the following groups and I set the "Application Pool User" access to enable write access and I could upload the document without any problem. 1) Application Pool User 2) Webspace Group 3) Anonymous Users I wonder if there will be a security problem when I set the write access for the "Application Pool User". Thank you. asked 7 mins agoGuven Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I want to know when user try to change his password, and even hook this function. I know there is GINA option, and that was replaced from Vista to ICredentialProvider. But at these two, I didn't find a specific API that will called anyway, or one function for every method, that will called when the user change his password. I think implement DLL proxy for the specific API (after I will find it), there is any better way to implement this hook, to catch the change password user and modify it? In Addition, at my research I found the function ChangeAccountPassword. And also reference to SpInitialize function with maybe relevant parameter: typedef struct SECPKG_FUNCTION_TABLE { ... ...
ادامه مطلبVote count: 0 After trying to use the sandbox and constantly getting the following error: php error message = fopen(https://svcs.sandbox.paypal.com/AdaptivePayments/Pay): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request I decided I'd switch to the Live environment. However, when I try to perform a Parallel Adaptive Payment (using a third party plugin for Magento), I always get the 550001 error (User is not allowed to perform this action). According to what I read elsewhere, I've checked that my PayPal Business account is verified (though I haven't got a definitve proof of that - how would I do that?), that my credentials are correct (using this URL) and that my applicatio...
ادامه مطلبVote count: 0 I have to write a program that writes a program that uses the heap to store an array. I have a problem where the program will crash after successfully ruing it... I also have some small aesthetic problems, the element needs to start at 1 and no comma on the last number that is printed. Can anyone help? #include #include int main() { int size = 0; int* num_elements; num_elements = (int*)malloc(sizeof(int)* 3); printf("How many int elements will you enter?"); scanf("%d", &size); printf("n"); for (int k = 0; k < size; k++) { printf("Element %d: ", k); scanf("%d", &num_elements[k]); } printf("n"); printf("The Array stores the following values: "); for (int j = 0; j < size; j++) { p...
ادامه مطلبVote count: 0 I have successfully deployed tutorial code from https://firebase.google.com/docs/auth/android/facebook-login for integrating Firebase Auth logins with Facebook. The users successfully created in Firebase Auth console. However, I noticed that the Email field in the user object is empty (—). Strangely, I successfully retrieved the email information directly from provider result objects using GraphRequest using the acquired token. Based on the documentation I read (https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser.html#getEmail()), the email field should be populated from login providers. Some additional strange behaviour: After successful lo...
ادامه مطلبVote count: 0 Problem: I'm trying to get the region of the authenticated user from boto3. Use case: I'm working on adding cache to https://github.com/pmazurek/aws-fuzzy-finder. I would prefer to cache the result on per-region basis. This package uses boto to get user authentication data (keys and the region). The problem is the region is never passed explicitly by the user, its being taken from one of the many murky places that boto reads so I don't really have a way of getting it. I have tried searching through boto3 api and googling, but couldn't find anything like a get_region or get_user_data method. Is it possible? asked 1 min agoPiotr Mazurek Let's block ads! بخوانید...
ادامه مطلبVote count: 0 In a MEAN application, I have a Facebook button on a modal window: Facebook The routes target is: router.get('/facebook', passport.authenticate('facebook'), function(req, res){}); router.get('/facebook/callback', function(req,res,next){ passport.authenticate('facebook', function(err, user, info) { if (err) {retu next(err);} if (!user) {retu res.redirect('/login');} req.logIn(user, function(err) { if (err) {retu next(err);} //res.locals.user = req.user; retu res.redirect('/'); }); })(req,res,next); }); I want to retu the useame to the main view and I have tried adding: app.use(function(req, res, next){ res.locals.user = req.user; next(); }); which I thought would make a user var...
ادامه مطلبVote count: 0 I am using google analytics in my asp.net mvc 5 and I am a new one to this. I have created a tracking Id and I have inserted the generated script to my layout page header(the script is saved in a separate file and imported using scrip tag). Now in my google analytics dashboard I can see the active user and it's showing the correct information. But in audiance section the user and session always remains only 1 even if in real-time I can see it's 10 or 20. In which area I am doing wrong can you please help me to point out. TIA. asked 47 secs agoMd Dinar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have recently ported a mysql database to AWS RDS Aurora. I caot seem to do the simple granting privileges tasks on my database. I can access the clustered mysql file with the RDS base user. Once in I execute the following. USE mysql; CREATE USER 'myUser'@'%' IDENTIFIED BY 'mypass'; // This works GRANT SELECT ON 'mytable'.* TO 'myUser'@'%'; // Retus 0 rows. I have verified table, etc. Thanks in advance. asked 3 mins agoGregg Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am testing with Codeigniter3.0.6 on User agent as below function then I try to testing IPhone, and Chrome inspect device mode but I got only number 1. I want to check if I view this website in Mobile phone it will echo number 2 if in PC browser echo number1 if can't detect browser show 0. asked 2 mins agoHeng Sopheak Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Hy! I am able to share Parent container's property via attribute directive and inputs, but it doesn't work if the child component is pulled in by . Any advice how to share with every component? Btw i get the global user with async call in the app.component. asked 2 mins agoSándor Veres Let's block ads! بخوانید...
ادامه مطلبVote count: 0 05-25 12:29:53.536 4506-4506/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.thegads.uliza, PID: 4506 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.thegads.uliza/com.thegads.uliza.MainActivity}: com.google.firebase.database.DatabaseException: No properties to serialize found on class com.thegads.uliza.model.User at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.j...
ادامه مطلبVote count: 0 I have used the below code to load pop on Page load,i dont want it load everytime a user refreshes page $(function () { var overlay = $(''); overlay.show(); overlay.appendTo(document.body); $(document).ready(function() { $('.popup').show(); $('.close').click(function(){ $('.popup').hide(); overlay.appendTo(document.body).remove(); retu false; }); }); asked 1 min agoManan Chawda Let's block ads! بخوانید...
ادامه مطلبVote count: 0 According to this link, I executed this command to backup my database: xtrabackup --backup --databases='database' --target-dir=/home/user/backups --datadir=/var/lib/mysql/ But I get the following error: 160520 02:00:54 version_check Done. 160520 02:00:54 Coecting to MySQL server host: localhost, user: root, password: set, port: 0, socket: /var/lib/mysql/mysql.sock Using server version 5.5.44-MariaDB xtrabackup version 2.4.2 based on MySQL server 5.7.11 Linux (x86_64) (revision id: 8e86a84) xtrabackup: uses posix_fadvise(). xtrabackup: cd to /var/lib/mysql/ xtrabackup: open files limit requested 0, set to 1024 xtrabackup: using the following IoDB configuration: xtrabackup: iodb_...
ادامه مطلبVote count: 0 I am trying to get the basic user login ruing from the FOSUserBundle. I am using Symfony 3.0.6. I followed the description to setup everything from the FOSUserBundle: https://symfony.com/doc/master/bundles/FOSUserBundle/index.html DB is up and ruing everything seems fine except I cant figure out how to override the layout.html.twig from the FOSUserBundle. I followed this description for achieving that: https://symfony.com/doc/master/bundles/FOSUserBundle/overriding_templates.html I now have a file "layout.html.twig" in the folder "Resources/FOSUserBundle/views" with the content being the same as in the last link provided above. This leads to the following error: Unable to find ...
ادامه مطلبVote count: 0 I'm using some theme which has it's own testimonials widget. How I can provide user ability to write testimonials via form on the site? asked 1 min agoRoman Volkov Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am just curious if this is bad practice. On my user object, under the profile attribute I am plaing on storing the users likes. For instance the object would be like this: user { profile: { likes: [ { user: { _id: USER_ID, avatar: USER_AVATAR, useame: USER_USERNAME }, ... ] } } What conces me about doing it this way is that if the user associated changes his avatar, it wouldn't be the same as the avatar associated to this user. Also likes could have an infinite amount so I am afraid that could get really hit my performance as the array grows. Is there a better way to approach this? I know in a traditional database, i would have a separate table for this and use a join to pull...
ادامه مطلبVote count: 0 I'm leaing how to make Setting API Options in WordPress but every time add a code into my functions.php file it brings up this error. how do I fix this? Waing: call_user_func_array() expects parameter 1 to be a valid callback, function 'my_plugin_menu' not found or invalid function name in /Applications/MAMP/htdocs/wp-test-sites/wp-includes/plugin.php on line 525 Waing: call_user_func_array() expects parameter 1 to be a valid callback, function 'my_plugin_menu' not found or invalid function name in /Applications/MAMP/htdocs/wp-test-sites/wp-includes/plugin.php on line 525 Waing: call_user_func_array() expects parameter 1 to be a valid callback, function 'my_plugin_menu' not fou...
ادامه مطلبVote count: 0 I am leveraging Spring Roo to create a web application where users access and create information accessible only by their 'Company', defined through implementing UserDetails. @RooJavaBean @RooToString @RooJpaActiveRecord(sequenceName = "PORTALUSER_SEQ", finders = {"findPortalUsersByUseame", "findPortalUsersByCompany" }) public class PortalUser implements UserDetails { @ManyToOne @JoinColumn(nullable = false) private Company company; } With the default aj, any authenticated user with read/write access can perform all CRUD operations. The issue occurs when an authenticated user performs an operation outside of their Company by using an id they should not have access to. Company F...
ادامه مطلب