0
votes
1answer
21 views

loginout function customization

I want to make login / logout function inside my header to display when the user is logged in Logged in as,{user name} where {user name} should be wrapped inside an anchor tag with a custom permalink ...
0
votes
1answer
104 views

how redirect users to custom login page when “login to reply” is clicked? [duplicate]

I am building my website on Wordpress and I have created my custom login page.But for a post when an user comments and other nonlogged see the comment with along with a line down "Login to reply".And ...
0
votes
1answer
41 views

User meta and public function security

I am using stripe to setup a system of buying credits, which can be used on my wordpress site. I save credits using wordpress user meta, and I increment those credits after a successful transaction ...
0
votes
1answer
70 views

call wp_insert_user in custom class doesnt work

im creating a custom class to manage users in wordpress and chamilo but this is not the point. Class looks like this: class Platform { private $security_key = '..'; private $secret_key; ...
0
votes
0answers
35 views

Create user from external file

I have this little script for create user from page of template i use in wordpress template page : $user_name = "usertest"; $user_pass="123456"; $user_email="myemail@domain.com"; wp_create_user( ...
0
votes
1answer
72 views

Get users with different roles and call function on each of them (user_meta)

First of all, I have a custom function in functions.php that gets some author information. This works on great on single posts with a single author. <?php function the_author_box() { ?> <div ...
0
votes
1answer
61 views

Create dropdown of users in admin dashboard

I'm trying to make a list of users come up in a widget in the admin dashboard. So far i've got it showing up, but I want the list to show a custom field from the user's profile instead of the normal ...
0
votes
1answer
158 views

Display a list of users with avatar filterable with alphabets

I'm trying to create a page which should display a list of users with the role "Author" only and exclude all other default and custom roles. I also want them to be filterable by alphabets, so if I ...
0
votes
2answers
282 views

get USER ID in functions.php using user_register action

I am having trouble of getting the ID in user_register filter in functions.php... Here is what I got add_action( 'user_register', 'sendanotheremail' ); function sendanotheremail($user_id) { ...
0
votes
2answers
446 views

How to detect first visit of a user?

I want to build an alert for users who visit my WordPress blog. Is there a conditional function like is_home() to detect if someone visits the blog the first time? I want to send the alert to every ...
0
votes
1answer
775 views

How to update BuddyPress xprofile fields programmatically?

I update user info using wp_update_user function. I also need to update the table wp_bp_xprofile_data. Is there any function, where I can update data on wp_bp_xprofile_data table?
1
vote
2answers
111 views

Remove the deleted users avatar from list

Problem Hi everyone, I have a bit of a problem. I have a function that outputs the avatars of users that follow me . It works great, but if the user is deleted the avatars remain visible as a blank ...
0
votes
1answer
695 views

How to add first name, last name and company name to my custom registration form

I´m trying to add first name, last name and company name to my custom registration page. The registration form almost works, but there is a problem. So far I´ve got this code, but I cant get the ...
0
votes
1answer
356 views

Show errormessages on wrong username/password on custom loginform?

I use this simple HTML loginform in my sidebar. Does anyone have any clever way to make it show the errormessages when you type in wrong password or username? <form action="<?php echo ...
0
votes
2answers
296 views

How can I show different content for different user-levels?

Can I use is_user_logged_in to manage content for different roles? Example: If subscribevr user is logged in.... show content.... else show "you are not logged in" and on anonther page if ...
2
votes
1answer
1k views

How to manually activate user in dashboard only by admin

I'm looking for a function that allows admins (only) to activate new users. When a user registers he have to be approved by the admin before he gets access to log in. Does anyone know how I can do ...
3
votes
3answers
2k views

Logout redirect to current page - function

I'm looking for a function that can redirect users when they logout to the current page. I'm looking for a code I can use in functions.php?
0
votes
1answer
185 views

Use of antispambot with $curauth->email

This is probably pretty simple, but... I want to use the WP function antispambot not on get_the_author_email but on a value in a field I added to User Profile called publicemail. Everything I've ...
0
votes
1answer
579 views

Uses for function: wp_update_user

my theme currently uses the wp_update_user function to update a set of user metas. I created to some new user meta fields that I would like to include in the existing wp_update_user. The function ...
2
votes
1answer
1k views

How to paginate the get_users function?

Im using the get_users function to show a custom list of users on the site. The only issue Im having a problem figuring out now is how to paginate the result. This is a sample of the function that Im ...
0
votes
3answers
84 views

Custom user role still showing up after deletion, ideas?

I previously created a new user role called "Owner" which worked fine, however I decided to delete it afterwards from my functions.php since I found it to not be as useful for my project after ...
0
votes
1answer
37 views

How to know when an user is loged in?

Hello i have this simple problem: when the user is logged an podcast player is shown, other case no. How verify when the user is logged? Im wordpress and php newbie. Thankx
1
vote
6answers
3k views

Adding fields to the “Add New User” screen in the dashboard

I'd like to add the field "Company Name" to the add new user page in the admin panel. I've done quite a bit of searching and have been unable to find details on how to do this. I can easily add info ...
0
votes
1answer
76 views

referencing the current user in a page i created in wordpress

I created a page in wordpress and i tried to access the current logged in user via wp_get_current_user() and am getting error "function undefined". please how do I make this function available in my ...
10
votes
1answer
563 views

Is there a is_user_logged_in() for multisite?

Is there a is_user_logged_in() function for Wordpress MU / Multisite (3.0+) where I can add in the network site ID like is_user_logged_in(2) where 2 would be the site_id? Update: After a little ...
0
votes
2answers
287 views

Best way to tell if a comment is from a user?

I've got an if ($comment->user_id) block to pick an default admin comment gravatar (different than a non-user's). But I'd still like this gravatar to be used if a user comments using their ...
1
vote
1answer
829 views

$user_id vs. is_user_logged_in()

I found a code scrap on the internet which uses if($user_id) { instead of if ( is_user_logged_in() ) { to check if the user is logged in. I would assume that the first would be slightly faster ...
0
votes
2answers
929 views

Change labels on 'Nickname' and 'Biographical Info' in user-edit.php

For a project I'm working on, I want to change the labels of the 'Nickname' and 'Biographical Info' fields on edit profile (user-edit.php) page in the dashboard. I still want to use those fields as ...
0
votes
1answer
2k views

How to display multiple custom columns in the wp-admin users.php?

I'm using the manage_users_columns to display a custom field I create in the usermeta database called company. My code is as follows: function mysite_column_company( $defaults ) { ...
2
votes
2answers
456 views

Set user loggin status?

I create user with wp_create_user,after succesfully creating a user I need to set his status to be logged in?How to set his status to be logged in ?