w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How can all of my ViewControllers for iOS have user login information available to them?
There is concept called NSUserDefaults in iOS to which is used to store light weight information in iPhone memory. Look at this examples to learn storing and retrieving data in NSUserDefaults : example1 and example2. EDIT : As you want to store login and password, use keychain. Here is an keychain example.

Categories : IOS

Trying to display user information after they login
Citation from the php manual: Note that all columns must be bound after mysqli_stmt_execute() and prior to calling mysqli_stmt_fetch(). Depending on column types bound variables can silently change to the corresponding PHP type. see http://php.net/manual/en/mysqli-stmt.bind-result.php So just put it that way: $stmt->execute(); $stmt->bind_result($_SESSION['firstname'], $_SESSION['lastname']); $stmt->fetch();

Categories : PHP

ExtJS: How to store a user's login information only once?
Ext.util.Cookies.set('myObj',Ext.encode(obj)) Use something like this and when you want to use it id = (Ext.decode(Ext.util.Cookies.get('myObj'))).id

Categories : PHP

Spring Login user information retreival
if you create new User object, the username will be null definitely (if you have empty default constructor only). You can get username in jsp like this: <sec:authentication property="principal.username" /> and don't forget to add declaration on top: <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> Read more about it here

Categories : Java

PHP connection to the database to check user login information
with other people's help problem solved! Thanks everyone! if ($_POST['username'] != "" && $_POST['password'] != "") { $data = mysqli_query($dbcon, " SELECT * FROM `users` WHERE `user_name` = '".$_POST['username']."' AND `user_password` = '".$_POST['password']."'") or die(mysqli_error()); // if this user exists if ($data->num_rows == 1) { session_start(); $result_row = $data->fetch_object(); $_SESSION['user_name'] = $result_row->user_name; $_SESSION['user_password'] = $result_row->user_password; $_SESSION['user_logged_in'] = 1; } else { echo "Wrong Pas

Categories : PHP

what information facebook allow to access of any user login through his/her own site
The /me endpoint is described in the Graph API documentation: http://developers.facebook.com/docs/reference/api/user/ There you have a list of all possible fields. Of course you can only request those fields for which you requested in the scope when authenticated and the user explicitly granted permissions in the consent page. You can read the scopes and permissions here: http://developers.facebook.com/docs/reference/login/#permissions

Categories : Asp Net Mvc

ASP.NET MVC 4: How to Obtain User Information from Twitter After Successful Login?
I am not really sure what your needs are or what you need to achieve with the user information that you return but there is an awesome Facebook Template written by the ASP.Net team which shows you how you can explore the users Graph on Facebook. You can find full information on the following link ASP.NET MVC Facebook Sample I hope it helps.

Categories : C#

Best practice: storing user login information alongside application data
Theoretically a separate table can be better protected, because you can limit the rights on it. But in the end, at some point you will need to read that data to be able to login. Nevertheless, it may still be a good idea to do so. You can more safely grant every application or every part of your application access to the user table, and hide the login information so only a specific part of your can validate logins using different credentials. After that, you can even write a separate application (like a webservice) that does authentication for you. That way, the regular application(s) don't have access to the login information at all. They just can ask the server whether a user is authenticated. So long story short: yes, separating login information does increase the possibility to b

Categories : Database

Need examples for creating user reviews in Java/Play Framework
No you will not find such ready-to-use solution as Play is a framework not a CMS... sorry. You also should NOT for Java samples how to do that as each framework has it's own set of tools and sometimes the same things requires quite different approach. Instead you should start by learning... the Play. Your case is really easy, and you should be able to write it basing on the official documentation and/or samples, check computer-database and forms for an instance. In very general product with reviews will be quite similar to any blog with post and comments so maybe some video tutorial will help you to get the concept. That's really easy ;]

Categories : Java

Android twitter user/show (user information) migration version 1 to 1.1
I have solved my problem by sending authentication with api. In api version 1.1 we need to send authentication with request otherwise we get 400 bad request(invalid request). This is the coding example for sending authentication. private OAuthConsumer consumer; consumer = new CommonsHttpOAuthConsumer( Constants.CONSUMER_KEY, Constants.CONSUMER_SECRET); consumer.setTokenWithSecret(token,secret_token); .......... HttpGet httpGet = new HttpGet(params[0]); consumer.sign(hpost); we need sign-core and sign common post jars.

Categories : Android

DRY approach to add user information without using Auth.user in Django
I would recommend using a dummy value in either the date_joined or last_login fields for the User model, if you wanted to implement a solution without adding a new field just to serve as an indicator flag. The potential problem with using the is_active flag is that you may end up wanting to use this flag to "blacklist" or effectively delete an account without actually removing their record from your database (to prevent re-creation of the account with same credentials, etc.) If you start relying on the fact that the password is not set, then if the day ever comes where you want to implement alternative login methods (OAuth) then your password field will not be set in these cases as well (huge conflict).

Categories : Django

I want to add user as "guest user" to my google play devloper account
Currently, the Android Console does not offer any fine graining on what guest can do on the console. You may have to look into app tracking services like App Annie which could provide statistic info without allowing the user to upload a new version to your app. Altough it would be impossible for another user to update a new version of your app without having access to your developer certificate.

Categories : Android

How to restrict the user to login on multiple windows on same browser with different user types
You are setting a variable in the user's session. You can just not allow the user to login again when this variable is set, since he'll be already logged in. Also, don't forget to call session_start(). i.e. you can put this at the very top of your login page: session_start(); if (isset($_SESSION['user'])) header("location:loggedin.php");

Categories : PHP

Should I change my UserProfile table or create other tables to hold additiaonl user info after user login
There should be no issue in adding further fields to your UserProfile object - as long as you don't change the data in the columns used by the auth process then you will be fine. With regards to whether you should split the users 'auth' data from their other data (name, country etc) is really a design question. If you expect that every users profile will always have both kinds of data, then having them together in one table probably makes sense. However, if a user may have 'auth' data, but not necessarily have the other data at any given time, then it probably makes sense to split them into two tables so that the data sets can be maintained separately.

Categories : Python

Loading user language after user login in codeigniter
We should load the specific language of the user initially within __construct() function like this: (Consider payment class as an example) class payment extends CI_Controller { public function __construct() { parent::__construct(); $this->lang->load('general', $this->session->userdata('user_language')); $this->lang->load('payment', $this->session->userdata('user_language')); } // Remaining methods... }

Categories : Codeigniter

php mysql user login show user exists
Why not do like this? <?php function user_exists($username) { $username = sanitize($username); $query = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'"); $exists = mysql_num_rows($query) == 1 ? 1 :0; return $exists; } ?>

Categories : PHP

linking user-id and feedback-id after user login
You should link the feedback and the user at the time of submittion, after inserting to the feedback table you need to also insert into the user-info table if the user is logged in $sql= "INSERT INTO feedback (feedbacktitle, name, email, comment, datetime) VALUES('$feedbacktitle', '$name', '$email', '$comment', '$datetime')"; $result = mysql_query($sql); if($result) { $feedbackid = mysql_insert_id(); if(isset($_SESSION['userid']) && $_SESSION['loggedin'] ) { $uid = $_SESSION['userid']; $uinfo_sql = "INSERT INTO user-info (feedbackid, userid) VALUES('$feedbackid','$uid')"; $uinfoResult = mysql_query($uinfo_sql); //etc etc } }

Categories : PHP

Cloud endpoints authentication from android: Oauth framework user didn't match oauth token user
When you are accessing GAE app with cloud endpoints from android client, it will be using ID tokens. So if you are getting the warning Oauth framework user didn't match oauth token user , then you must be seeing some failure in id_token verification and seeing some warning like id_token verification failed. Checking for oauth token. Please check if your endpoints.get_current_user() method is returning None in this case and then check for any errors in your authentication part. This post explains ID tokens in detail and this post explains the limitations in knowing User_id when using ID tokens and the possible workarounds EDIT: : Find below the final solution based on Kai Stavginski's suggestions As suggested, oauth framework warning is seen when there is some error in id_token verificat

Categories : Android

Login failed for user 'DomainUserID'. Reason: Could not find a login matching the name provided
Did you add that windows login in SQL Server? CREATE LOGIN [<domainName><login_name>] FROM WINDOWS; GO Update: If you do not know the sa password and your windows login does not work. You will have to do one of the following: Unistall and reinstall Put the instance in single user mode (only works if you are an admin on the SQL Server machine), http://msdn.microsoft.com/en-us/library/dd207004.aspx

Categories : Sql Server

Java HtmlUnit login with user and password returns to login page
Looks like your code is ok. I have tried it manually and sometimes it loggins and sometimes not. The problem is in the pop-up window which appears after login operation. You can saw it from the javascript on the page: if ($("#ErrorDuplicationLogin").text() != '') { $(".PopUpContent").show(); $(".pagePopBackground").show(); } }); So try to login and logout manually and after that launch your program. Also do not forget to logout using HtmlUnit. Thank you.

Categories : Java

MVC4 WebSecurity.Login fails first time through, can't get User in Login method
As the post you found pointed out the user identity is not set immediately after login, so User.Identity.Name does not contain the user name. Use model.UserName instead. Try changing this line: if (!IsProfileComplete(WebSecurity.GetUserId(User.Identity.Name))) To this: if (!IsProfileComplete(WebSecurity.GetUserId(model.UserName)))

Categories : C#

Django- why inbuilt auth login function not passing info about user to after successful login url
Once the user is redirected to accounts/profile/ the view for that link will be returned. You can access information about the currently logged in user there as per this post by using request.user. Also tip to see what information you have access to in your views. Use import pbd; pdb.set_trace(). This pops you into a python prompt with access to all of the current variables. To see all the defined variables call locals(), though this will print out a ton of junk along with it. In the template you can display a "you can't access this page" message if the user isn't logged in.

Categories : Python

how to keep the user login for all pages in wordpress custom login function?
You can use the wp signon function: Function Reference/wp signon as you can see here: <?php wp_signon( $credentials, $secure_cookie ) ?> it gets and array ($credentials) and a boolean (which is optional). here you can see a sample code it's use: $creds = array(); $creds['user_login'] = 'username'; $creds['user_password'] = 'password'; $creds['remember'] = true; $user = wp_signon( $creds, false ); if ( is_wp_error($user) ) echo $user->get_error_message(); this function is a core wp function, means that which means that when it's used, it will do everything the wordpress need it to do for it to work as it should. next, you need to use WordPress Cookies. in your case i have seen you used: Function Reference/wp set auth cookie which is taking these parameters: <?ph

Categories : Wordpress

how do I detect if user logged in using my login button or login from facebook?
Just add a parameter to the links you're using for login buttons. For example http://www.example.com/index.php?login=facebook http://www.example.com/index.php?login=custom

Categories : Javascript

Want to make user login on button click with out using asp login control
Use this: FormsAuthentication.SetAuthCookie("username", true); in Login1_Authenticate before calling Response.redirect(somewhere.aspx); It'll set the user as logged in. You can get username by accessing the textbox for username in the login control.

Categories : C#

jsf, how to redirect to login page when user doesn't login?
there are several libraries or mechanisms to protect your pages from un-authorized users. In a Java EE environment you usually use the features from the application server and configure some security constraints in web.xml If you want to rely on a more independent technology I can recommend Spring Security: http://www.springsource.org/spring-security (if you are using spring already that would be my first choice) and Apache Shiro: http://shiro.apache.org/ (which to me is a slightly simpler to understand) The manual approach would be to create a Servlet-Filter in web.xml to protect certain urls (both frameworks above work like that).

Categories : Jsp

What is a good way to inform the user about the progress?
I would prefer a sticky notification with a Progress Bar, so the user can use your app in the *'loading time' and when he wants to look up the Progress, he pulls down the notification bar, and voila. if you want, you can make a Toast when the task finished.

Categories : Android

PHP login script will only login a specific user ?
I guess thats happening because your row index is set to 0 in mysql_result().Instead of using mysql_result try mysql_fetch_assoc. It will retrieve the user info in associated array. Hope that helps.

Categories : PHP

Is it a good idea to use a file to log user access to a ASP.Net 4 site? If not why not?
The biggest consideration is how you intend to consume this log data. If all you want to do is open the log file and see what people are doing, in the order that they are doing it, then a file will work just fine. Or if you need the data purely for audit purposes, so in the rare case that there's an issue you can go back through all your log files and parse them to find some specific useful tidbit, a simple file will probably work well enough. Concurrency issues are handled well by most modern logging frameworks. On the other hand, if you want to be able to effectively query the data, a database table will give you a lot more power. For example, you can see just the actions taken by a given user during a given time period, if you have captured the time and active user as separate fields i

Categories : Asp Net

Symfony Security / Custom User Provider : How to get the login password within the custom User Provider?
@Pazi is correct in that building your own custom authentication provider will work. However, it's not an easy task. An alternative approach is to override DaoAuthenticationProvider and have it pass the password to the loadUser function. security_listeners.xml: <parameter key="security.authentication.provider.dao.class"> SymfonyComponentSecurityCoreAuthenticationProviderDaoAuthenticationProvider </parameter> Bit of a hack perhaps but it saves a good deal of work.

Categories : Authentication

What is a good way for an app user-agent string looking like iPhone/Chrome/Whatever to most of the websites?
I think the result you're seeing is expected. Sites sniff the user-agent in order to determine how to display the content. Essentially, you're creating an "unknown" agent as far as the rest of the world is concerned, so the default will typically be to show the desktop version. Perhaps you can use a the default user-agent string but add something onto the end as an extension. Check this out https://en.wikipedia.org/wiki/User_agent_string#Format and http://tools.ietf.org/html/rfc2616#section-14.43 Note the description of the last segment Mobile/7B405: This is used by the browser to indicate specific enhancements that are available directly in the browser or through third parties. An example of this is Microsoft Live Meeting which registers an extension so that the Live Meeting serv

Categories : Iphone

Is it a good user experience for ios to disable back button when a condition becomes true?
This isn't a good use for a navigation controller. It's never a good idea to take control away from the user like this. Allow them to cancel their choice in some way. It's also not the correct metaphor for a navigation controller. One way to do this without navigation controllers is to show some previously hidden control when a choice is made. Look in the Settings app, for example Date and Time, which shows more UI when a choice is made.

Categories : Iphone

API development, Bootstrap and jQuery. Good idea to inject them all in user's code?
If you have to have jquery and bootstrap, the only acceptable solution for an embeddable widget would be an iframe. You could write a loader script which places the iframe with your main content onto the page. I've written a quite extensive article about how to build embeddable widgets and their best practices on my blog here: http://codeutopia.net/blog/2012/05/26/best-practices-for-building-embeddable-widgets/ (based on a Stack Overflow answer I gave some time ago, but couldn't find the link to it)

Categories : Javascript

Is there a good PHP editor with user defined/custom code completion for MacOS?
I, and many others I know, am a huge fan of PhpStorm and believe it's well worth the money. Great code completion that also recognizes PhpDoc Awesome debug support Integrates well with VC Easy to install plugins that add support for myriad things. e.g. LESS, SCSS, CoffeeScript, NodeJS, much more. A ton of other useful features Check out the trial, spend a little time configuring the settings. e.g. I've added many live templates, set up PHPCS, code style, etc. Become familiar with the keyboard shortcuts for quickly navigating/finding files & symbols (objects, methods, functions) Cmd+Shift+N, Cmd+Shift+Alt+N. Pretty sure most of that is in the Quick Tips dialog.

Categories : PHP

Get user information in Windows 8?
@seshuk had given you the correct answer, from the MSDN documentation Only domain users have a principal name. Access to the principal name can be blocked by privacy settings (for example, if the UserInformation::NameAccessAllowed property is false). If access is blocked, this method returns an empty string. This method requires the enterpriseAuthentication capability. A Hotmail id, by definition, would not be a domain user. Additionally, you'd need a company account to publish such an app, since it requires the enterprise authentication capability.

Categories : C#

How to get all user information from twitter with api v1.1?
You can use this link FHSTwitterEngine and check the code given in answer.. FHSTwitterEngine is latest library with compatible with v1.1.. its should solve your problem

Categories : Iphone

Retrieving information of validated user in WCF
If you are using the WCF in web application you can store the user details in cookie as the CodeProject article does or you can follow WCF Authentication as here: msdn.microsoft.com/en-us/library/ff405740.aspx Use below code to get user: var currentUser = new WindowsPrincipal((WindowsIdentity) System.Threading.Thread.CurrentPrincipal.Identity);

Categories : C#

Trying to use MySQL to return user information
You forgot to use single quote around value in query mysql_query("SELECT * FROM users WHERE username='{$_SESSION[username]}'"); ^^ ^^ Also stop using mysql_* functions they are deprecated, Use MySQLi OR PDO.

Categories : PHP

how to get user information in google wallet
I thought the answer would lie in the postback facility. That gives google's user ID and order number. However, I didn't see how to convert either of those to an email address for sending the digital good just purchased. BTW. I rejected doing the fulfilment client side as that seemed insecure. If I'm wrong about that then why would they offer the postback facility? ... then I realised, we could do part of it client and part server side. I guessed that something comes back from the client-side success callback. success: function(result) { console.log('success',result.response.orderId); complete(result.response.orderId); }, So, I now have the google's orderId on the client side and there I know the user's ID. So my complete() function can send the orderId and o

Categories : Android

Get currently logged in user information in ektron
Use the Framework API. Take a look at: Ektron.Cms.Framework.Context.UserContextService.Current This will give you everything you're asking for. Here's a screenshot of the properties I have available to me in a v8.7 installation. Should be available all versions v8.5 and up. http://screencast.com/t/TcSdTySH9R

Categories : Api



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.